Commit Graph

6952 Commits

Author SHA1 Message Date
Dmitry Gozman
f82e09be04
feat(codegen): generate locators and frame locators (#11873) 2022-02-04 19:27:45 -08:00
Yury Semikhatsky
46dfa45b4e
docs: fix parallel test docs build (#11877) 2022-02-04 16:44:04 -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
Yury Semikhatsky
afc4b505aa
docs: fix duplicate sections (#11874) 2022-02-04 13:50:46 -08:00
Daniel Kolesa
e67d212451
browser(webkit): roll to 02/03/22 (#11852) 2022-02-04 08:37:49 -08:00
Aarni Koskela
6881db6817
docs: fix typo in Python APIRequestContext example (#11861)
`playwright.chromium` should be `p.chromium`, etc.
2022-02-04 16:36:30 +01: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
github-actions[bot]
d9c82b8784
browser(chromium): roll to r966993 (#11862)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-04 11:19:21 +01: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
Pavel Feldman
72424dc904
chore: allow setting reporter via env (#11848) 2022-02-03 16:10:39 -08:00
Yury Semikhatsky
d237ad76c1
test: mark cltr+click test as timing out on windows (#11840) 2022-02-03 09:09:38 -08:00
github-actions[bot]
f96b1dd43b
feat(webkit): roll to r1609 (#11824) 2022-02-03 08:20:39 -08:00
Pavel Feldman
1215057ca1
chore: use ipc transport for out-of-process driver (#11826) 2022-02-02 21:26:45 -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
Yury Semikhatsky
55b9d14bbd
browser(webkit): revert r288284 (#11821) 2022-02-02 15:38:55 -08:00
Leonardo Henrique Tsuda
de8f22a8ff
docs(selectors.md): fix fill and FillAsync examples (#11790) 2022-02-02 12:10:34 -08:00
dependabot[bot]
f6dd9b0c11
chore(deps): bump nanoid from 3.1.29 to 3.2.0 (#11778)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.29 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.29...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 16:15:18 +01:00
Max Schmitt
20450b96ff
devops: fix broken emojis on TG on Windows bot (#11810) 2022-02-02 16:14:21 +01: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
Pavel Feldman
ceb3027bdf
chore(test-runner): force colors in worker processes (#11799) 2022-02-01 17:29:15 -08:00
Dmitry Gozman
a30bc171c5
chore: make playwright-test tests debuggable with extension (#11798) 2022-02-01 17:15:55 -08:00
Zack Guo
4bbd38560a
docs(CONTRIBUTING.md): update how to run a specific test (#11697) 2022-02-01 16:08:08 -08:00
Sanghyeon Lee
731931ae58
docs(test-timeouts-js.md): fix inconsistent style of 'override' (#11766) 2022-02-01 15:59:30 -08:00
Pavel Feldman
6e2fcc4700
chore: do not expose suite load error (#11797) 2022-02-01 15:34:16 -08:00
Pavel Feldman
011d743f90
chore: roll test runner to ToT (#11796) 2022-02-01 15:34:09 -08:00
Yury Semikhatsky
e7bd62f202
docs(electron): minimal version (#11792) 2022-02-01 14:45:30 -08:00
Dmitry Gozman
4a52bc9465
docs: add option fixtures section to release notes (#11794) 2022-02-01 14:34:47 -08:00
Pavel Feldman
f875ebe730
fix(test-runner): respect source maps when reporting test files (#11770) 2022-02-01 13:04:54 -08:00
Max Schmitt
e7120d2ca2
docs(python): add API testing guide (#11775) 2022-02-01 21:44:43 +01:00
Max Schmitt
028afb167b
chore: bump production dependencies (#11787) 2022-02-01 21:27:34 +01:00
Pavel Feldman
a3bc911a3d
fix(debug): don't apply infinite timeouts when using debugger (#11785) 2022-02-01 11:51:37 -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
Yury Semikhatsky
c2f6462a6b
fix(trace-viewer): info message for actions without snapshots (#11765) 2022-02-01 09:26:38 -08:00
Max Schmitt
e0c4e66272
chore: bump dev dependencies (#11779) 2022-02-01 17:12:11 +01:00
Pavel Feldman
c82f2641d7
fet(list-files): report per-project test dir and filters (#11764) 2022-02-01 08:08:56 -08: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
Andrey Lushnikov
1dc0ddffce
browser(chromium): roll Chromium to an upstream fix (#11762)
References #11754
2022-01-31 16:36:15 -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
Yury Semikhatsky
bec050c4c4
browser(webkit): add missing include on windows (#11759) 2022-01-31 13:39:40 -08:00
Yury Semikhatsky
129d9d3643
docs(tracing): clarify capture semantics (#11756) 2022-01-31 11:44:10 -08:00