Commit Graph

1536 Commits

Author SHA1 Message Date
Yury Semikhatsky
7d7fe3c618
fix(route): remove cors option, compare origin (#13231) 2022-03-31 19:21:21 -07:00
Dmitry Gozman
e5182259b1
feat(role selector): docs and minor fixes (#13203)
- Added docs to `selectors.md`.
- `[pressed]` and `[checked]` do not match `"mixed"` states.
- Disallow `[name]` shorthand without a value.
- Renamed `includeHidden` to `include-hidden`.
2022-03-31 13:06:39 -07:00
Marcus Felling
705a994f18
docs: add VS Code extension (#12372) 2022-03-30 09:31:35 -07:00
Jim Fisher
7d734802fc
docs: explain why video has gray borders 2022-03-30 09:19:05 -07:00
Andrey Lushnikov
a9989852d5
feat(vrt): new option "caret" for taking screenshots (#13164)
This has two values:
- `"hide"` to hide input caret for taking screenshot
- `"initial"` to keep caret behavior unchanged

Defaults to `"hide"`.

Fixes #12643
2022-03-29 17:48:13 -07:00
Dmitry Gozman
eb09306db2
feat(connect): add connectOptions.timeout (#13163) 2022-03-29 15:03:43 -07:00
Ross Wollman
bb90ab1471
docs: use case-sensitive keyword (#13136) 2022-03-28 14:16:33 -07:00
Yury Semikhatsky
5734c18ef8
feat(route): add cors header in route.fulfill (#12943) 2022-03-25 14:56:57 -07:00
Max Schmitt
c8cc62a2e6
chore: add link validation for docs (#13047) 2022-03-25 19:30:45 +01:00
Andrey Lushnikov
0243bb4920
docs: refresh CI docs (#13020)
- Travis CI docs are badly rotten. I recall there was a need to
  list all the custom apt packages in the `travis.yml`, and it's a
  hassle to maintain this list for us. I remove the whole section for now
  since we don't see lots of Travis CI usage among our clients.
- Refresh other bits

Fixes #12855
2022-03-24 14:08:32 -07:00
Max Schmitt
1797c5c249
chore(test-runner): support self signed certificate in webServer (#13032) 2022-03-24 17:30:52 +01:00
Max Schmitt
434a729396
docs(dotnet): add missing Docker image (#13043) 2022-03-24 16:58:21 +01:00
Max Schmitt
81050c406e
chore: fix snippets in release-notes (#13033) 2022-03-24 07:52:04 -07:00
Dmitry Gozman
418dc9ea5d
docs(parallel): tell about fully parallel mode (#13013) 2022-03-23 16:43:46 -07:00
Dmitry Gozman
03b08c1ff9
docs(webServer): prefer url over port (#13008) 2022-03-23 16:07:30 -07:00
Andrey Lushnikov
e1700bd167
feat: use package.json directory as a default for outputDir (#12942)
This patch:
- starts using directory of `package.json` to resolve default
  output directory path
- starts using either `package.json` directory or configuration
  directory to resolve all relative paths

References #12970
2022-03-23 16:05:49 -07:00
Andrew Hayward
ab39cfcb18
docs: fixing example code in accessibility API docs (#12664)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-03-23 11:50:35 +01:00
Dmitry Gozman
722302799e
feat(selectors): support regular expressions in attribute selectors (#12960)
Supports inline regex in addition to string: `_react=BookItem[author = /Ann?a/i]`.
This is similar to `text=` selector, but applies to `_react` and `_vue`
selectors. In the future, will also apply to `role=` selector.
2022-03-22 17:00:56 -07:00
Ross Wollman
541fb39a51
feat(html-reporter): add report context header (#12734)
Resolves #11318.

* Adds `TestConfig.attachments` public API. (We opted to not implement an analog to the async `TestInfo.attach(…)` API.)
* Adds `TestConfig.attachments` to common reporters.
* Dogfoods some git and CI-info inference to generate useful atttachments
* Updates HTML Reporter to include a side bar to present a pre-defined set of attachments (a.k.a git/commit context sidebar)

Here's what it looks like:

<img width="1738" alt="Screen Shot 2022-03-21 at 3 23 28 PM" src="https://user-images.githubusercontent.com/11915034/159373291-8b937d30-fba3-472a-853a-766018f6b3e2.png">

See `tests/playwright-test/reporter-html.spec.ts` for an example of usage (for dogfood-ing only). In the future, if this becomes user-facing, there the Global Setup bit would likely become unnecessary (as would interaction with attachments array); there would likely just be a nice top-level config and/or CLI flag to enable collecting of info.
2022-03-22 16:28:04 -07:00
Max Schmitt
4aa7677f98
docs(dotnet): fix EvalueHandleAsync typo (#12920) 2022-03-22 16:36:21 +01:00
Yury Semikhatsky
0adf5536af
docs(fetch): clarify cookie handling (#12892) 2022-03-21 13:20:17 -07:00
Andrey Lushnikov
cfe92e1608
feat(test-runner): implement expect.poll (#12815)
This patch implements `expect.poll()` method that polls given
predicate until a given synchronous predicate completes.

Usage:

```js
// wait until page gets 3 frames.
await expect.poll(() => page.frames().length, {
  timeout: 1000,
  message: 'custom error message',
}).toBe(3);
```

Fixes #10235
2022-03-18 16:31:26 -07:00
Dmitry Gozman
209bde5000
feat(test runner): descrbe.skip (#12865)
`describe.skip` declares a test group that is skipped.
2022-03-18 16:07:11 -07:00
Dmitry Gozman
25483452c0
feat(fixtures): per-fixture timeout (#12751)
By default, fixtures share timeout with the test they are instantiated for.
However, for more heavy fixtures, especially worker-scoped ones, it makes
sense to have a separate timeout.

This introduces `{ timeout: number }` option to the list of fixture options
that opts the fixture into a dedicated timeout rather than sharing it
with the test.
2022-03-17 09:36:03 -07:00
Andrey Lushnikov
fa81561073
docs: remove ---disable-dev-shm-usage recommendation from docs (#12811)
We now pass this flag to chromium unconditionally.
2022-03-16 15:44:31 -07:00
Andrey Lushnikov
e16f3c46b4
docs: always keep docker references up-to-date in documentation (#12795)
References #12796
2022-03-16 13:51:39 -07:00
o.mingaleev
9fc9aeeb23
docs: fixed wrong types for WebServerConfig.cwd (#12817)
Co-authored-by: Oleg Mingaleev <oleg.m@profi.io>
2022-03-16 12:14:12 +01:00
Ross Wollman
964eeba0dc
docs: remove mis-placed command (#12787) 2022-03-15 17:38:36 -07:00
Pavel Feldman
9ff9a9711d
docs: fix grep release notes (#12801) 2022-03-15 17:28:25 -07:00
Max Schmitt
61c66bb82b
docs(docker): stop advertising :focal tag (#12791)
Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
2022-03-15 19:28:19 +01:00
Max Schmitt
01beb6310a
docs: mention locator.nth is zero based (#12750)
Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
2022-03-14 21:06:44 +01:00
Max Schmitt
fff4681c6c
docs: fix broken release-notes links (#12747) 2022-03-14 12:25:26 -07:00
Andrey Lushnikov
cd81fc9945
docs(release-notes): fix release notes for .net (#12743) 2022-03-14 11:04:59 -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
Yury Semikhatsky
19de9cacc3
docs: delete verification guide (#12698) 2022-03-12 09:32:54 -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
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
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
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
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
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
Yury Semikhatsky
5f1188d195
docs: fix js example formatting (#12635) 2022-03-09 17:10:37 -08:00
Yury Semikhatsky
176846672f
docs: clarify multiple before/after hooks execution order (#12606) 2022-03-08 17:42:50 -08:00