Граф коммитов

7341 Коммитов

Автор SHA1 Сообщение Дата
Yury Semikhatsky 55d06721c6
devops: support build on macOS 11 (#12742) 2022-03-14 10:54:19 -07:00
Andrey Lushnikov b7e92a44cb
docs: add release notes for all other languages (#12596)
Drive-by:
- backport removal of toHaveScreenshot from release 1.20
- change webkit 10.15 announcement
2022-03-14 10:52:52 -07:00
Dmitry Gozman 237954212c
Revert "feat(line reporter): show stats, handle tty" (#12735)
This reverts commit be817d1a53, PR #12695.
Reason: found issues with stdout messing with stats.
2022-03-14 10:37:43 -07:00
github-actions[bot] 9af88b6425
browser(chromium): roll to r980398 (#12721)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-14 11:29:22 +01:00
Pavel Feldman 3b0a5b4753
chore: mount should return locator pointing to the component element / fragment (#12718) 2022-03-13 21:26:13 -07:00
Pavel Feldman 25c0369eaf
chore: prepare to publish component packages (#12697) 2022-03-12 13:51:27 -08:00
Yury Semikhatsky 19de9cacc3
docs: delete verification guide (#12698) 2022-03-12 09:32:54 -08:00
Max Schmitt adcd32fc6e
fix(expect): toHaveCSS with custom CSS properties (#12709) 2022-03-12 09:32:40 -08:00
Andrey Lushnikov acae63c409
test: skip fonts test on Windows (#12708)
This test requires windows-specific test expectations. We'll use
it as a playground for the rebaseline workflow.

References #12707
2022-03-12 00:14:56 -08:00
github-actions[bot] ffc8031bad
feat(chromium): roll to r980066 (#12705)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-12 09:07:57 +01:00
Andrey Lushnikov ef4b34fb7a
feat(toHaveScreenshot): enhance messaging in case of failures (#12677)
This patch:
- adds call logs to track screenshot timeouts, e.g. due to
  waiting for web fonts
- makes sure all snapshot expectations have `.png` extension
- throws a polite error when given a buffer or a string instead of a
  page or a locator
- removes stray NL between error description and call log
- makes sure `apiName` is always correct (and adds a test for it)
2022-03-11 22:40:28 -08:00
Dmitry Gozman be817d1a53
feat(line reporter): show stats, handle tty (#12695)
- Line reporter now shows stats in addition to the test name:
  ```log
  [chromium] › page/page-click-react.spec.ts:108:1 › should not retarget when element changes on hover
  23% [21/93] Passed: 17 Flaky: 0 Failed: 0 Skipped: 4 (7s)
  ```

- When connected to a TTY or with `env.PLAYWRIGHT_LIVE_TERMINAL`
set to anything but `'0'` or `'false'`, line reporter updates in place.

- When not connected to a TTY, line reporter prints an update
after each ~1% of tests done, so it never prints more than 100 lines.

- Updated tests to the golden style.
2022-03-11 18:19:33 -08:00
Pavel Feldman e9fa098bf3
chore: add ct examples (#12693) 2022-03-11 15:46:11 -08:00
Ross Wollman 72b95b9ffa
chore: dogfood dotenv (#12673)
Use a top-level .env file to control the internal testing setup.

This allows for easy manipulation of environment variables regardless
of your setup (VSCode Extension, CLI, etc.).
2022-03-11 15:12:25 -08:00
Max Schmitt d15910b450
docs(test-runner): add note about custom annotations (#12681)
o-authored-by: Dmitry Gozman <dgozman@gmail.com>
2022-03-11 19:09:23 +01:00
Andrey Lushnikov 95c774cf84
feat: support multiple screenshots in HTML report (#12577)
This patch adds support to multiple diffs. These are possible
due to soft assertions.

Drive-by: rename second screenshot in `toHaveScreenshot` failure when
re-generating expectations from "expected" to "previous".
2022-03-11 08:46:13 -08:00
Andrey Lushnikov e3ab6388a9
feat(toHaveScreenshot): enable sensible defaults (#12675)
This patch:
- Enables configuration of certain defaults for some options of `expect.toHaveScreenshot` method via `TestProject.expect.toHaveScreenshot` property
- Sets sensible defaults for these options:
  * `fonts: "ready"`
  * `animations: "disabled"`
  * `size: "css"`
2022-03-11 08:45:36 -08:00
Yury Semikhatsky 9d4f330411
docs: fix python link to test-assertions (#12665) 2022-03-11 08:28:06 -08:00
Pavel Feldman af55f48754
chore: add experimental mount (#12657) 2022-03-11 08:00:46 -08:00
github-actions[bot] d7c1a57565
browser(chromium): roll to r980066 (#12682)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-11 12:14:20 +01:00
Ross Wollman ebae5e76df
feat(test-runner): more default workers for M1 (#12660)
New default is based on the very (unscientific) output of repeated a few
times:

```
$ for i in `seq 5 13`; do time npm run ctest -- --reporter=line --workers=$i 'page/*' 'selector*' 'channels*' 'resource-timing*'; done
```
2022-03-11 02:12:07 -08:00
Andrey Lushnikov 1dc581c1a0
test: fix test that gave 2 pixel screenshot diff on Linux (#12671) 2022-03-10 20:26:31 -08:00
Andrey Lushnikov b51157bdea
feat: bring back maxDiffPixels in toMatchSnapshot (#12627)
This patch reverts 2 commits that removed the feature from the method:
- "fix: explicitly ignore maxDiffPixels in toMatchSnapshot (#12570)"
  commit b8af8458d6.
- "chore: remove `maxDiffPixels` from toMatchSnapshot (#12539)"
  commit a3dff45974.
2022-03-10 18:41:16 -08:00
Andrey Lushnikov e83549e8a0
fix: support all commong screenshot options in toHaveScreenshot (#12670)
This patch adds support for all common options in
`expect.toHaveScreenshot`.
2022-03-10 18:36:20 -08:00
Andrey Lushnikov 65b9cba143
chore: follow-up to animations default option (#12669)
This is a follow-up to 42765804bc
that was landed without bots.

I ran the bots manually on Linux & Mac.
2022-03-10 17:26:50 -08:00
Andrey Lushnikov 689d8196e0
chore: follow-up to fix docs (#12668)
This is a follow-up to 49e66c7f08 that was landed without bots.

I ran bots manually on Mac & Linux.
2022-03-10 17:19:44 -08:00
Andrey Lushnikov 42765804bc
chore: add `"allow"` as a default value for animations. (#12663) 2022-03-10 17:15:36 -08:00
Andrey Lushnikov 49e66c7f08
feat(screenshot): introduce new "fonts" option for screenshots (#12661)
This option will wait for webfonts to load before taking screenshots.
2022-03-10 16:54:36 -08:00
Andrey Lushnikov 12d8a262be
feat: support `screenshotsDir` option (#12642)
The `screenshotsDir` option controls the expectation storage
for `toHaveScreenshot()` function.

The new expectation management for screenshots has the following
key properties:
- All screenshots are stored in a single folder called `screenshotsDir`.
- Screenshot names **do not** respect `snapshotDir` and `snapshotSuffix`
  configurations.
- `screenshotsDir` is configurable per project. This way a "smoke tests"
  project can re-use screenshots from "all tests" project.
- Host platform is a top-level folder.

For example, given the following config:

```js
// playwright.config.ts
module.exports = {
  projects: [
    { name: 'Mobile Safari' },
    { name: 'Desktop Chrome' },
  ],
};
```

And the following test structure:

```
smoke-tests/
└── basic.spec.ts
```

Will result in the following screenshots folder structure by default:

```
__screenshots__/
└── darwin/
    ├── Mobile Safari/
    │   └── smoke-tests/
    │       └── basic.spec.ts/
    │           └── screenshot-expectation.png
    └── Desktop Chrome/
        └── smoke-tests/
            └── basic.spec.ts/
                └── screenshot-expectation.png
```
2022-03-10 16:50:26 -08:00
Yury Semikhatsky 10bf5f3e49
docs: update links to assertions docs (#12662) 2022-03-10 15:45:18 -08:00
Pavel Feldman 4d3d0e2bda
chore: enable ts-esm support by default (#12658) 2022-03-10 14:48:33 -08:00
Yury Semikhatsky cf643ff04c
docs: remove unsupported permission "push" from docs (#12654) 2022-03-10 14:00:25 -08:00
Max Schmitt 324e3ff3ae
docs: add .NET as a new Docker image (#12659) 2022-03-10 22:20:04 +01:00
Dmitry Gozman a388bb2302
feat(screenshot): size:'css'|'device' option (#12634)
With this experimental option, screenshot dimensions are in CSS pixels,
not physical device pixels, effectively ignoring the device scale factor.
2022-03-10 13:07:10 -08:00
Max Schmitt 372a3219f3
chore: remove Python from main Docker image (#12431) 2022-03-10 19:51:35 +01:00
Max Schmitt 90e76f9adb
test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
Max Schmitt 3f468abedd
fix(test-runner): ESM compatibly on Windows (#12615) 2022-03-10 19:27:25 +01:00
Max Schmitt d805cd9097
chore: skip failing android tests 2 (#12647) 2022-03-10 18:46:50 +01:00
Max Schmitt 49fd77d9af
docs: reference to external allure reporter (#12646) 2022-03-10 09:01:42 -08:00
Yury Semikhatsky e270adf437
docs: fix broken link (#12638) 2022-03-09 22:00:16 -08:00
Andrey Lushnikov 75eef09c0d
feat: show expectation name as part of toHaveScreenshot title (#12612)
This patch adds snapshot file name as part of `toHaveScreenshot`
and `toMatchSnapshot` step title.
2022-03-09 20:09:45 -08:00
Yury Semikhatsky 5f1188d195
docs: fix js example formatting (#12635) 2022-03-09 17:10:37 -08:00
Yury Semikhatsky d49843edaa
fix(firefox): add missing dependency on Ubuntu 18.04 (#12625) 2022-03-09 11:21:15 -08:00
Dmitry Gozman 92430cc56c
chore(fixtures): do not force-close contexts in beforeAll (#12416)
This now happens the same way as for the test, in the worker cleanup
when browser closes, which is reported as a part of the test.
2022-03-09 07:26:46 -08:00
Dmitry Gozman e8ce5d0258
feat(test runner): on beforeAll failure, precisely skip the tests (#12417)
Previously, we used to skip all the tests from the same file when
any `beforeAll` fails in the file.

Now, we only skip the rest of the tests affected by this particular
`beforeAll` and continue with other tests in the new worker.
2022-03-08 20:29:31 -08:00
Dmitry Gozman 4a768294b4
chore: cleanup hooks notion from raw/html reporters (#12610) 2022-03-08 19:08:31 -08:00
Dmitry Gozman e895bc2751
reland(test-runner): rely on test title paths instead of ordinal (#12611)
Fixes #11904

Co-authored-by: Andrey Lushnikov <lushnikov@chromium.org>
2022-03-08 19:06:25 -08:00
Dmitry Gozman 682eeb4ae0
reland(hooks): separate test timeout from beforeAll/afterAll timeouts (#12609)
This makes it possible to have longer `beforeAll`/`afterAll` and not
affect first/last test timeout.
2022-03-08 19:05:23 -08:00
Yury Semikhatsky 176846672f
docs: clarify multiple before/after hooks execution order (#12606) 2022-03-08 17:42:50 -08:00
Dmitry Gozman 62a032baa0
chore: remove env.PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK (#12605) 2022-03-08 16:42:39 -08:00