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

1316 Коммитов

Автор SHA1 Сообщение Дата
Dmitry Gozman bf4c315b09
fix(types): explicit ExpectMatcherState type, optional Expect arg (#28119)
Fixes #28035.
2023-11-13 18:37:50 -08:00
Pavel Feldman 1b3349d091
chore: use codemirror in the on-hover locator editor (#28090) 2023-11-10 22:00:28 -08:00
Max Schmitt 6d3913f459
chore: fix Ubuntu 22.04 WebKit on 20.04 host (#28068)
https://github.com/microsoft/playwright/issues/27313
2023-11-09 21:59:28 +01:00
Dmitry Gozman 2afd857642
chore: prepare to use codemirror in recorder (#28025) 2023-11-07 20:49:03 -08:00
Max Schmitt f518684d89
chore: fix parameterized tests on the flakiness dashboard (#27900)
Abstract issue: I have parameterised tests via the titlePath (describe)
and they are not shown on the flakiness dashboard. Before #24486 only
title() was shown, after #24486 titlePath() will be displayed, but we
still did have the testId based on the test.title() and not
test.titlePath(). This ends up that they will still be treated as a
single spec.

After this change they are not treated as a single spec anymore and
treated as different ones:

<img width="891" alt="image"
src="https://github.com/microsoft/playwright/assets/17984549/f24284cd-5d94-4f7e-a45d-8c8e5eb537ef">

Note: This is tested.

Follow-up on https://github.com/microsoft/playwright/pull/24486.
2023-11-01 17:28:30 +01:00
Max Schmitt 5f366088be
chore: get rid of rimraf package (#27790)
This seems more reliable nowadays as rimraf.

https://github.com/microsoft/playwright/issues/27712

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-26 19:41:00 +02:00
Max Schmitt 841bb92049
chore: update Docker Node.js version to new LTS (20) (#27813)
Node.js 20 was promoted to LTS on 2023-10-24.

Fixes https://github.com/microsoft/playwright/issues/27812
2023-10-26 09:45:54 -07:00
Playwright Service 00d3b4bdc3
chore(driver): roll driver to recent Node.js LTS version (#27814)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-26 10:31:29 +02:00
Pavel Feldman 7de0ccd36e
chore: support await using for close() and dispose() (#27766)
This change assumes that the user has Node 18 with Symbol.dispose
available.

Fixes https://github.com/microsoft/playwright/issues/27141
2023-10-24 12:25:53 -07:00
Dmitry Gozman fd82b2b3fa
feat(json report): add expected/unexpected/skipped/flaky stats (#27685)
Fixes #27498.
2023-10-18 12:55:31 -07:00
Playwright Service 86ce598dfa
chore(driver): roll driver to recent Node.js LTS version (#27652)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-17 14:58:35 +02:00
Max Schmitt 4b771f9d4b
chore: remove /ms-playwright-agent in focal Docker image (#27631)
This was missing in focal but was there in Jammy.


6b31b30df9/utils/docker/Dockerfile.jammy (L44)
2023-10-16 18:17:21 +02:00
Max Schmitt 6b31b30df9
chore: allow a script to generate release-notes for GitHub (#27596)
`node utils/render_release_notes.mjs js 1.39`
2023-10-16 11:23:22 +02:00
Playwright Service 8595a6c25f
chore(driver): roll driver to recent Node.js LTS version (#27565)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-12 12:16:22 +02:00
Pavel Feldman 393bd36e0a
chore: composed->merge (#27555) 2023-10-11 13:56:27 -07:00
Dmitry Gozman 7447761fb7
fix(build): ignore empty bundle directories (#27491)
These are often left after some file moves.
2023-10-06 12:29:01 -07:00
Max Schmitt 293c85935a
devops: publish using NPM provenance feature (#27459)
As per
https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions.

We use Node.js 18 (LTS) to get NPM 9+.

Closes https://github.com/microsoft/playwright/issues/22555
2023-10-05 20:00:18 +00:00
Jim Hays dcc8dcca73
Fix various typos (Fixes #27396) (#27391)
Fixes https://github.com/microsoft/playwright/issues/27396
2023-10-04 19:56:42 -07:00
Pavel Feldman 25f06575bf
docs: recommend using test stories in ct (#27440)
Closes https://github.com/microsoft/playwright/issues/27439
2023-10-04 19:48:26 -07:00
Dmitry Gozman daba77644c
feat: composedExpect (#27432)
Allows to merge multiple expects with custom matchers added by
`expect.extend()`.
2023-10-04 15:01:25 -07:00
Dmitry Gozman 65ce4cd213
feat: expose `composedTest()` instead of `test._extendTest()` (#27414) 2023-10-03 13:26:30 -07:00
Yury Semikhatsky c751bf135e
devops: stop using deprecated method of installing node (#27392)
Otherwise we see a warning for 1 minute every time during the script
run:

<img width="616" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/4593048c-a901-4db5-a15e-1b6dd1970625">


The instructions are taken from
https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions
2023-10-02 14:24:58 -07:00
Andrey Lushnikov 471d12ac7b
chore: keep `linux browser deps` script up-to-date (#27309)
References https://github.com/microsoft/playwright/issues/27255
2023-10-02 11:34:49 -07:00
Yury Semikhatsky bb8a102164
chore(types): add blob reporter to the known reporter types (#27371)
Closes https://github.com/microsoft/playwright/issues/27357
2023-09-29 15:15:18 -07:00
Pavel Feldman d136b0aeb6
feat(step): allow boxing steps (#27334) 2023-09-29 09:44:00 -07:00
Dmitry Gozman 66eb3043f5
feat(json report): expose startTime and duration (#27290)
Fixes #27183.
2023-09-25 10:58:55 -07:00
Pavel Feldman a6a0257c88
feat(expect): allow chaining expects (#27248) 2023-09-22 12:12:17 -07:00
Playwright Service 59df916b8d
chore(driver): roll driver to recent Node.js LTS version (#27175)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-19 12:32:29 +02:00
Max Schmitt 0d44405762
fix: custom expect matchers on Locator/Page/APIResponse instance (#27117)
Fixes https://github.com/microsoft/playwright/issues/27113
2023-09-15 18:05:44 +02:00
Dmitry Gozman 603861c48d
fix: revert toMatchSnapshot deprecation (#27089)
- This reverts commit
8348f66107
landed in #26718.
- Update docs to point towards `toHaveScreenshot`.
2023-09-14 12:52:41 -07:00
Max Schmitt 5faa66912c
docs: add types to Python run() defs (#27044)
Fixes https://github.com/microsoft/playwright-python/issues/2071
2023-09-13 15:18:15 +02:00
Yury Semikhatsky fac4560a82
chore(types): host, port in html reporter config (#27027) 2023-09-12 13:38:10 -07:00
Pavel Feldman 02c72e545b
feat(onEnd): allow overriding the exit code (#27010)
Fixes: https://github.com/microsoft/playwright/issues/26858
2023-09-12 13:37:30 -07:00
Max Schmitt 466088215e
chore: clear NPM cache of Docker image (#27000) 2023-09-12 08:14:45 +02:00
Dmitry Gozman 186f86905c
chore: make `@playwright/test` depend on `playwright` (#26946) 2023-09-08 14:23:35 -07:00
Ivo Berger f219f9fd41
devops: fix tags on jammy stable images (#26834) 2023-09-03 09:57:09 +02:00
Max Schmitt cc30d72b0b
test: roll android chromium to 1190572 (#26807) 2023-08-31 18:08:27 +02:00
Pavel Feldman 34c6197f9e
chore: include start/endTime and duration in onEnd report callback (#26760)
Fixes https://github.com/microsoft/playwright/issues/23637
2023-08-29 10:56:21 -07:00
Dmitry Gozman 36347e7fea
feat: make `playwright` package not install browsers automatically (#26672)
Additionally introduce `@playwright/browser-<browser>` packages that
just download the respective browser, but do not export anything.

References #26614.
2023-08-27 07:24:35 -07:00
Pavel Feldman eb9ef64e7d
fix(android): use domain socket suffix chrome can discover (#26724)
Fixes: https://github.com/microsoft/playwright/issues/26721
2023-08-25 19:30:09 -07:00
Dmitry Gozman 8348f66107
feat: deprecate toMatchSnapshot for buffers (#26718)
These are usually used for screenshots instead of toHaveScreenshot.
String-based snapshots are left as is.

<img width="836" alt="deprecated"
src="https://github.com/microsoft/playwright/assets/9881434/d02818da-7eea-47fc-8ea8-4104b0dd49b5">

---

Also deemphasized toMatchSnapshot throughout all docs.

Fixes #26612.
2023-08-25 18:20:01 -07:00
Dmitry Gozman 81cc39ea6e
feat(expect): narrow down available assertions for Page/Locator/APIResponse (#26658)
Fixes #26381.
2023-08-23 13:14:39 -07:00
Richard Blažo bcc30bc71e
feat: add title for before and after hooks (#26523) 2023-08-21 09:50:22 -07:00
Marcin Strzyz 192b697488
chore: remove old webpack folder structure (#26560) 2023-08-19 16:16:44 -07:00
Pavel Feldman 576608b69d
chore: revert #24598 (#26484) 2023-08-15 11:29:33 -07:00
Max Schmitt 2deabefa71
fix: Locator.evaluateHandle types (#26469)
Fixes https://github.com/microsoft/playwright/issues/26449
2023-08-14 18:27:25 +02:00
Dmitry Gozman c37dfb379b
docs: make sure usage comes after description when templating (#26420) 2023-08-10 14:48:26 -07:00
Playwright Service b252f8ba27
chore(driver): roll driver to recent Node.js LTS version (#26399) 2023-08-10 12:25:32 +02:00
Pavel Feldman 08d6abab4a
chore: allow merging defineConfig (#26390) 2023-08-09 17:23:34 -07:00
Pavel Feldman 65ac0d5256
chore: add k8s grid deployments (#26359) 2023-08-08 18:46:32 -07:00
Pavel Feldman 6731f5b6d5
chore: grid placeholder (#24598) 2023-08-04 08:38:07 -07:00
Max Schmitt b0473b71cd
chore: limit docs snippet length to 100 (#24563) 2023-08-02 11:23:47 +02:00
Dmitry Gozman 57ab732fb8
chore: support `npm run build -- --sourcemap` (#24529) 2023-07-31 13:53:28 -07:00
Dmitry Gozman a74101d98f
docs: document expect's asymmetric matchers (#24498)
References #24460, #24417.
2023-07-28 14:04:01 -07:00
Max Schmitt c6a0e5d02c
devops: fix parameterised tests on flakiness dashboard (#24486)
Fixes https://github.com/microsoft/devops.playwright.dev/issues/2
2023-07-28 16:24:17 +02:00
Dmitry Gozman ea6d127f28
feat(connect): exposeNetwork option (#24436) 2023-07-26 17:29:31 -07:00
Dmitry Gozman c8b45aa844
chore: validate markdown links in doclint (#24444)
Fixes #24421.
2023-07-26 16:15:07 -07:00
Max Schmitt c4ecdcfc22
chore: lint code snippet languages (#24381)
Follow-up to https://github.com/microsoft/playwright/pull/24367.
2023-07-25 00:32:46 +02:00
Max Schmitt 1634ec8766
chore: introduce code snippet linting infra (#23960) 2023-07-24 22:27:44 +02:00
Playwright Service fdfe4ca275
chore(driver): roll driver to recent Node.js LTS version (#24321) 2023-07-20 12:15:16 +02:00
Andrey Lushnikov 1fdd7541e0
chore: add firefox-asan for stress tests (#24049) 2023-07-19 05:53:52 -07:00
Pavel Feldman 49c1f9eb02
feat(ui): run deps in UI mode if dep projects are checked (#24245) 2023-07-15 15:11:31 -07:00
Andrey Lushnikov 9af2b518f2
fix: exclude `tracesDir` option from `launchOptions` fixture (#24086)
Fixes https://github.com/microsoft/playwright/issues/23645
2023-07-06 13:31:44 -07:00
Pavel Feldman 0409bfca56
chore: ensure module deps in ct-core (#24056)
Fixes https://github.com/microsoft/playwright/issues/23823
2023-07-06 12:01:45 -07:00
Patrick Shaw 6e78dcb7dc
fix: Allow portable bash paths for systems including NixOS (#23889)
Although very common, bash is not guaranteed to be located at
`/bin/bash`. NixOS is an example of this.

More commonly, `/bin/bash` can be quite out of date. An example of this
is MacOS's version of `bash`. This realistically won't affect Playwright
but it's worth noting. You can technically update MacOS's system version
of bash but you need elevated permissions to do so.

By using `/usr/bin/env bash` instead of `/bin/bash` we can execute
Playwright's bash scripts in like NixOS and generally improve the
selection behaviour for bash in other systems too.

Some discussion of why it's worth favouring `/usr/bin/env bash` over
`/bin/bash`:
- Discusses `/bin/bash` missing in NixOS:
https://discourse.nixos.org/t/add-bin-bash-to-avoid-unnecessary-pain/5673
- Some general commentary on why `/usr/bin/env bash` is favoured:
https://askubuntu.com/a/1402721
- Points out how old bash is in MacOS:
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba

Improves situation at #5501
2023-07-03 06:27:06 -07:00
Max Schmitt f7b34e3172
fix(dotnet): generate bool? correctly in generated transport channel types (#23966)
https://github.com/microsoft/playwright-dotnet/issues/2581
2023-06-29 22:16:16 +02:00
Max Schmitt fef029e98e
docs: code snippet alignments (#23959) 2023-06-29 18:26:19 +02:00
Playwright Service b15cdc8ce8
chore(driver): roll driver to recent Node.js LTS version (#23854)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-22 12:06:44 +02:00
Dmitry Gozman fbb5d48283
feat(expect): roll to v29.5.0 (#23629)
There is a breaking in change in the `MatcherContext` that is passed to
matcher functions, so we now have `!!this.isNot` in a few places. The
same could happen to custom matcher in the wild.

```ts
// Old
{
  isNot: boolean;
  promise: string;
}
```

```ts
// New
{
  isNot?: boolean;
  promise?: string;
}
```

Fixes #23612.
2023-06-19 15:18:59 -07:00
Andrey Lushnikov 2bc8cf2fc7
fix: drop `expect.configure({ poll })` from types (#23661)
`poll` option is not actually supported as of June 12, 2023.

Fixes https://github.com/microsoft/playwright/issues/23622
2023-06-12 11:07:39 -07:00
Pavel Feldman 294f5c965a
chore: fix a lint on win (#23554) 2023-06-06 14:50:44 -07:00
Rui Figueira ba69de8c7c
fix(check-deps): normalize paths in posix (#23513) 2023-06-05 12:33:54 -07:00
Max Schmitt 80fe9748eb
chore: render plain class links in types (#23508) 2023-06-05 18:50:44 +02:00
Max Schmitt 10ec3cfa2a
chore: generate docs versions in pw.dev (#23412)
https://github.com/microsoft/playwright/issues/23395
2023-06-01 01:14:00 +02:00
Dmitry Gozman 06318d52d6
chore: support `import { type Foo }` in check deps (#23405) 2023-05-31 14:08:59 -07:00
Dmitry Gozman 00b34dddb2
chore: move TestServer under test/ (#23287) 2023-05-25 15:11:16 -07:00
Pavel Feldman 64dde29788
chore: move to npx playwright-core install when using core (#23260) 2023-05-24 12:16:59 -07:00
Andrey Lushnikov 8ebe4dc81a
devops: do not use NPX during docker container build (#23213)
The postmortem of the broken docker image:
- We use `playwright-core` package when bootstrapping our docker
container.
- Due to accidental removal of `bin` entry in the `playwright-core` (see
  https://github.com/microsoft/playwright/issues/23206), the `npx
  playwright install --with-deps` was using the last published
  Playwright version instead of a locally-built playwright binary

This patch starts using `npx exec --no` to make sure that we never call
remote commands during docker image build.
2023-05-22 19:21:09 -07:00
Dmitry Gozman ab7e794bf7
feat(shard): introduce `mode: 'default'` (#23023)
This mode allows a suite to opt-out from parallelism. Useful to setup
multiple suites running in parallel, with each suite not being sharded.

References #22891.
2023-05-18 13:07:22 -07:00
Pavel Feldman 3395a28181
chore: opt out of trace attachments (#23139)
Fixes: https://github.com/microsoft/playwright/issues/23137
2023-05-18 11:27:45 -07:00
Debbie O'Brien 7a8eb15820
docs: add titles to config snippets (#22910)
Docs PR: https://github.com/microsoft/playwright.dev/pull/1039

---------

Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-05-10 18:38:12 +02:00
Andrey Lushnikov ff3275eb3e
chore: add report UUID (#22785) 2023-05-03 05:58:16 -07:00
Pavel Feldman 70011c82f7
chore: unflake ui tests (3) (#22741) 2023-05-01 15:18:34 -07:00
Dmitry Gozman dbb218a9d5
feat: `project.teardown` that runs after all dependents have finished (#22696)
This replicates globalTeardown in the deps world.

Fixes #21914.
2023-04-28 14:27:08 -07:00
Andrey Lushnikov 286428fda9
docs: release notes 1.33 (#22615) 2023-04-26 13:00:36 -07:00
Pavel Feldman a1007bbe2c
chore: introduce expect.configure (#22533) 2023-04-25 10:29:56 -07:00
mindaugasm be79ee0450
feat(html-report): add attachmentsBaseURL option (#22212)
Fixes https://github.com/microsoft/playwright/issues/21636
2023-04-18 11:25:11 -07:00
Pavel Feldman 00df08b3cf
chore: explicitly control actions with slow mo (#22445)
Fixes https://github.com/microsoft/playwright/issues/22273
2023-04-17 16:19:30 -07:00
Pavel Feldman 8d69fbacf7
chore: introduce ct-core to hard-depend on vite (#22437)
Fixes https://github.com/microsoft/playwright/issues/22233
2023-04-17 16:19:21 -07:00
Andrey Lushnikov 60aba4d394
chore: support browser aliases in roll_browser.js (#22389) 2023-04-13 13:57:47 -07:00
Playwright Service 0c3c6ed683
chore(driver): roll driver to recent Node.js LTS version (#22378)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-13 12:24:10 +02:00
Max Schmitt 336d2114c8
chore: have Ubuntu 22 Docker image by default (#22356)
Fixes https://github.com/microsoft/playwright-python/issues/1858
2023-04-12 19:40:23 +02:00
dependabot[bot] 635d180251
chore(deps): bump xml2js from 0.4.23 to 0.5.0 in /utils/flakiness-dashboard (#22346) 2023-04-12 09:55:17 +02:00
MarcNum fbdafc5fe3
feat: Adding trace option 'on-all-retries' (#21985)
Fixes: #21860
2023-03-31 13:04:24 -07:00
Max Schmitt 0c4eedbabe
docs: support code block titles (#22068)
Fixes https://github.com/microsoft/playwright/issues/21461
2023-03-29 23:15:39 +02:00
Dmitry Gozman 525097d465
feat: Locator.filter(locator) (#21975)
Produces a locator that matches both locators.
Implemented through `internal:and` selector.

Fixes #19551.
2023-03-27 14:29:30 -07:00
Yury Semikhatsky 95e7d3aabc
chore: hide store from public (#21763) 2023-03-17 11:50:44 -07:00
Pavel Feldman 27048adebe
chore: introduce testInfo.testId (#21670) 2023-03-14 15:58:55 -07:00
Dmitry Gozman 46f9fa005e
fix(tracing): do not double-zip entries in remote mode (#21579)
Fixes #21435.
2023-03-10 14:54:32 -08:00
Playwright Service 644a17570f
chore(driver): roll driver to recent Node.js LTS version (#21520) 2023-03-09 12:55:22 +01:00
Max Schmitt c9eac69f2b
fix(types): accept string in expect().toMatch() (#21454)
Fixes https://github.com/microsoft/playwright/issues/21453
2023-03-07 17:53:50 +01:00
Pavel Feldman 65117702e7
chore: consistent xterm naming (#21446) 2023-03-06 20:39:52 -08:00
Pavel Feldman cffb6ac269
chore: move sever/isomorphic to utils/ to use it in client (#21445) 2023-03-06 18:49:14 -08:00
Pavel Feldman 47427e87ec
chore: do not use module.exports in the injected esm files (#21412)
Follow up to #17145
2023-03-05 20:01:35 -08:00
Dmitry Gozman d904a6129f
chore: run check-deps for all packages (#21395) 2023-03-03 14:50:43 -08:00
Sebastian Silbermann fbaf56a13f
feat(ct-react): Support React 18 only (#19814)
BREAKING CHANGE: Drop support for React 17 and earlier
Support for React 17 an earlier is provided by
`@playwright/experimental-ct-react-17`

Closes #19923
2023-03-03 14:28:33 -08:00
Yury Semikhatsky f8100bbb25
fix: expect unquoted npde.exe path (#21307)
* It is more common to set env variable value without quotes on Windows
(see the bug)
* Use defined to check for string presence, it will work nicely with
strings that contain whitespaces

https://github.com/microsoft/playwright-java/issues/1213
2023-03-01 09:16:23 -08:00
Pavel Feldman 8ccc02a9d3
chore: use client wall time in traces (#21163) 2023-02-23 14:37:53 -08:00
Max Schmitt f3ec29e6ad
devops: use default Android emulator gpu (#21170)
Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-02-23 23:07:44 +01:00
Dmitry Gozman b735e136fe
chore: run non-concurrent steps in watch before everything else (#21164)
This prevents initial errors.
2023-02-23 11:46:20 -08:00
Playwright Service 681d584442
chore(driver): roll driver to recent Node.js LTS version (#21143)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-23 11:09:10 +01:00
Playwright Service f5b89ff9a9
chore(driver): roll driver to recent Node.js LTS version (#21056)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-21 14:32:52 +01:00
Dmitry Gozman 55f4b670a9
fix(test runner types): allow sync step functions (#20996) 2023-02-17 14:26:40 -08:00
Pavel Feldman d7a0b3bb4e
chore: implement pick locator in trace viewer (#20965)
Fixes https://github.com/microsoft/playwright/issues/7853
2023-02-17 11:19:53 -08:00
Yury Semikhatsky 09be9d6425
feat: key value store backed by filesystem (#20932)
Keys are used as a relative file path without any sanitization assuming
that the underlying fs will throw on error.
2023-02-16 16:48:28 -08:00
Dmitry Gozman 0b7f9055a3
chore: fix docs for python and java (#20962) 2023-02-16 11:48:38 -08:00
Yury Semikhatsky 90c4e6f9b2
chore: revert sharded html report (#20923)
We've decided not to ship it in the current form.

#10437
2023-02-15 12:38:03 -08:00
Max Schmitt 0484f02145
test: roll android chromium to 1103927 (#20828) 2023-02-10 21:28:36 +01:00
Dmitry Gozman 778dd20403
chore(docs): beautify generated types, put options always last (#20805) 2023-02-09 20:46:33 -08:00
Andrey Lushnikov bcb2d67c5d
chore: remove experimental dockerfile.remote (#20790)
We didn't find a compelling-enough use case to release this.
2023-02-09 12:18:02 -08:00
Cliff Su b6eb85a0ba
devops: upgrade linux-browser-dependencies tool to Node.js 18 (#20556) 2023-02-09 18:52:05 +01:00
Dmitry Gozman 190c121e66
chore: bundle chokidar, leave fsevents as an optional dependency (#20762) 2023-02-09 08:40:27 -08:00
Dmitry Gozman 98e2fe184e
chore(docs): sort members instead of validating (#20755) 2023-02-08 09:59:31 -08:00
Yury Semikhatsky a93cf767a1
feat: html reporter sharded option (#20737)
Make sharded report feature an opt-in:

```ts
{
   reporter: [['html', { sharded: true }]]
};
```

#10437
2023-02-07 22:21:50 -08:00
Andrey Lushnikov b67cef2c4d
feat: introduce Dockerfile.remote image (#20691)
When this image is launched, it exposes a single endpoint
that can be used to connect to and to launch browsers.
2023-02-07 10:50:44 -08:00
github-actions[bot] f608f65ce6
chore(driver): roll driver to recent Node.js LTS version (#20708)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-07 11:12:49 +01:00
Andrey Lushnikov 0a752f3fd6
chore(docker): remove experimental docker integration (#20676)
This removes everything related to docker integration experiments that
we conducted over the last 6 months.

I'll send a follow-up with an alternative suggestion that was demo'ed on
a team meeting in the end of December.
2023-02-06 10:50:45 -08:00
Dmitry Gozman e64c623e61
feat(expect): strip down Expect types (#20601)
This only leaves:
- documented assertions;
- asymmetric matchers;
- `resolves`/`rejects`;
- `expect.extend()`;
- `expect.getState()` with selected properties.

References #20432.
2023-02-03 15:56:31 -08:00
Martijn Cornips 5dd2b1ef0c
chore: update node version comment in dockerfile (#20496) 2023-02-02 16:44:20 -08:00
Dmitry Gozman 3180bc9804
fix(types): make most fixtures non-undefined (#20573)
Fixes #20416.
2023-02-02 13:11:50 -08:00
Dmitry Gozman f46883e58e
feat(expect): add GenericAssertions documentation (#20564)
References #20432.
2023-02-01 16:55:52 -08:00
Pavel Feldman 635b47025e
chore: expose project dependencies api (#20546) 2023-02-01 08:39:07 -08:00
Dmitry Gozman 9c6c31a442
fix(types): update PlaywrightTestConfig types (#20540)
This makes errors more focused on the custom properties.

References #20416.
2023-01-31 15:02:01 -08:00
Max Schmitt c6bc3ce23f
devops: upgrade Docker images to Node.js 18 (#20361)
Fixes https://github.com/microsoft/playwright/issues/20133
2023-01-26 16:34:32 +01:00
Pavel Feldman fe1dd7818d
chore: extract task runner for global setup (#20345) 2023-01-25 15:38:23 -08:00
github-actions[bot] 9f97190f99
chore(driver): roll driver to recent Node.js LTS version (#20319)
Since https://github.com/microsoft/playwright/issues/18790 is merged and
got released in 1.30 we can merge this now.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-25 11:07:59 +01:00
Pavel Feldman 147bb6b292
chore: run global setup before onBegin (#20285) 2023-01-23 17:44:23 -08:00
Andrey Lushnikov c9e3131832
chore: clarify flakiness dashboard deployment docs (#20292) 2023-01-23 06:52:44 -08:00
Andrey Lushnikov c07afc4382
chore: update flakiness-dashboard extension bundle (#20291)
This way it can work with newer runtimes.
2023-01-23 06:14:21 -08:00
Pavel Feldman e08168e16e
chore: temporarily remove project and global setup, store (#20181) 2023-01-18 12:56:03 -08:00
Pavel Feldman d1c161ce99
chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
Pavel Feldman e065d608b6
chore: introduce defineConfig for easier JS typing (#20061)
Fixes https://github.com/microsoft/playwright/issues/19694
2023-01-12 13:12:02 -08:00
Dmitry Gozman 9a5df720ff
chore: fix build/watch script for bundles and vite-powered packages (#20055) 2023-01-11 18:36:04 -08:00
Max Schmitt 0fe327c21b
chore: return Promise<any> in {page,context}.route (#20005)
Fixes https://github.com/microsoft/playwright/issues/19855
Closes https://github.com/microsoft/playwright/pull/19856
2023-01-10 18:07:17 +01:00
Dmitry Gozman 599ae30313
chore: update .net generator with deprecated/discouraged (#19843) 2023-01-03 23:03:38 +01:00
Hylke Postma b695478840
fix(driver): AttributeError error when CWD contains space (#19801) 2023-01-02 14:36:07 +01:00
Yury Semikhatsky 137070d889
Revert "chore: hide setup, store, TestProject.setupMatch, storageStat… (#19756)
…eName (#19442)"

This reverts commit 92dd734e04.
2022-12-28 15:39:31 -08:00
Yury Semikhatsky 2922eec8e9
chore: since for classes in api.json (#19639) 2022-12-21 16:30:01 -08:00
Pavel Feldman 675f0eb4a0
chore: report error location for fatal errors (#19610) 2022-12-21 09:36:59 -08:00
Max Schmitt 51782cfa5d
chore: fix docs roll (#19605) 2022-12-20 21:19:31 +01:00
Max Schmitt bb2a2c7331
fix: render discouraged / deprecated types (#19596)
Fixes https://github.com/microsoft/playwright/issues/19591
2022-12-20 16:19:07 +01:00
Sébastien Règne f78942d835
chore: Fix Firefox logo (#19476) 2022-12-19 14:47:37 -08:00
Pavel Feldman 3afd83c8cc
chore: withdraw locator.enumerate (#19484) 2022-12-15 10:13:56 -08:00
Max Schmitt 1dcb8f643d
chore: fix Android tests (#19426) 2022-12-15 07:56:57 +01:00
Pavel Feldman 0e2732decf
feat(api): introduce expect().toPass (#19463) 2022-12-14 19:23:13 -08:00
Pavel Feldman 17a0074459
feat(api): introduce Locator.all, enumerate (#19461) 2022-12-14 16:42:50 -08:00
Yury Semikhatsky 92dd734e04
chore: hide setup, store, TestProject.setupMatch, storageStateName (#19442) 2022-12-13 22:48:38 -08:00
Andrey Lushnikov 59a41f6051
chore: prepare to publish dockerfile.vrt docker image (#19324)
This patch:
- adds a new `Dockerfile.vrt` image file based on focal that installs
  VRT-related dependencies inside it.
- updates scripts to build & publish the new docker image.

Drive-by: remove stale file
2022-12-07 15:57:01 -08:00
Dmitry Gozman 622c1a8da6
tests: run browserType.connect tests against launchServer and run-server (#19340) 2022-12-07 14:36:32 -08:00
Fernando Garcia Llorente cd4ccdfa29
feat: allow options in automatic screenshots (#19143)
Closes #9983 

Allowing Automatic Screenshots in `PlaywrightTestConfig` to have
`fullPage` & `omitBackground` as optional parameters.
2022-12-07 08:45:33 -08:00
Yury Semikhatsky 1b3e53697b
chore: TestStorage => TestStore (#19308) 2022-12-06 13:33:43 -08:00
Yury Semikhatsky 3c1b26b9f1
feat: make storage a global variable (#19283) 2022-12-05 21:37:37 -08:00
Dmitry Gozman 81c8620bfe
chore: upgrade internal types to support TypeScript 4.9.3 (#19280)
Fixes https://github.com/microsoft/TypeScript/issues/51619

Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-12-05 17:22:25 -08:00
Pavel Feldman 291ad6e618
fix(md): ensure list offset when rendering (#19241) 2022-12-02 16:33:51 -08:00
Pavel Feldman 89bdaf2441
chore: rename ScreenshotAssertions to SnapshotAssertions (#19150) 2022-11-29 16:57:03 -08:00
Pavel Feldman be2139f0ac
docs: split assertions list into langs (#19039) 2022-11-24 08:25:24 -08:00
Pavel Feldman f9a32e0927
chore: follow up to deprecation changes (#19025) 2022-11-23 12:32:14 -08:00
Pavel Feldman f97dcd4c79
docs: annotate deprecated methods (#19005) 2022-11-23 08:40:47 -08:00
Max Schmitt 6a5552ba24
chore: drop Ubuntu 18.04 support (#18924) 2022-11-21 11:23:45 -10:00
Pavel Feldman 3fb4b3bbf9
chore: normalize api markdown (#18942) 2022-11-21 09:30:32 -08:00
Pavel Feldman 03d2b2ecbf
chore: move doc-specific code into documentation (#18933) 2022-11-19 11:26:11 -08:00
Yury Semikhatsky 05fb3e6de8
Revert "chore: hide TestProject.setup and TestInfo.storage (#18800)" (#18836)
Now that the patch has been cherry-picked to the release branch
reverting it on main.

This reverts commit 6deba5dc21.
2022-11-16 11:23:10 -08:00
Dmitry Gozman 0387d96cd5
chore: multiply overloaded options in csharp (#18818)
This way we'll get the same treatment in docs generator as well as
dotnet api generator.

This also adds non-suffixed aliases for string options, e.g. `Name` in
addition to `NameString` and `NameRegex`.

Fixes #18407.
2022-11-15 15:46:54 -08:00
Yury Semikhatsky 6deba5dc21
chore: hide TestProject.setup and TestInfo.storage (#18800) 2022-11-14 17:03:01 -08:00
Dmitry Gozman 1b0a8122ba
chore: allow `py` code blocks for python (#18799)
Turns out, we have some snippets that use `py` instead of `python`.
2022-11-14 14:50:01 -08:00
Dmitry Gozman bc6617b4ca
chore: verify tab groups in docs during lint (#18768)
This extracts the logic from playwright.dev so that we get early
warnings.
2022-11-14 13:05:05 -08:00
Yury Semikhatsky 70065ba6dd
Revert "chore(driver): roll driver to recent Node.js LTS version (#18… (#18791)
…636)"

The new node resolves loalhost to ::1 by default which breaks API tests
in the ports (Java in particular). Reverting to the previous LTS to
allow some time to implement happy eyeballs algorithm on our end by next
release.

This reverts commit 63a0b75186.
Reference https://github.com/microsoft/playwright/issues/18790
2022-11-14 11:30:36 -08:00
Dmitry Gozman 194abc35cd
Revert #18561 "feat(test runner): test.reset() to reset options to default/config value" (#18704)
This reverts commit 6fef227f43.

Not shipping in 1.28.
2022-11-10 14:45:05 -08:00
Andrey Lushnikov f52fa4ceba
chore(snapshotPathTemplate): address review comments (#18702) 2022-11-10 11:37:41 -08:00
Andrey Lushnikov 6d491f928d
feat(playwright-test): introduce snapshotPathTemplate configuration (#18568)
This configuration option allows to set a string with template
values for precise control over snapshot path location.

An example of `snapshotPathTemplate` usage:

```ts
// playwright.config.ts
// Notice the `testDir` configuration!
export default {
  testDir: './tests',
  snapshotPathTemplate: './__screenshots__/{platform}/{projectName}/{testFilePath}/{arg}{ext}',
}
```

Currently supported "magic tokens" inside the `snapshotPathTemplate`
are:

- `{testDir}` - project's `testDir`
- `{snapshotDir}` - project's `snapshotDir`
- `{platform}` - `process.platform`
- `{projectName}` - Project's sanitized name
- `{testFileDir}` - Directories in relative path from `testDir` to test
  file path (e.g. `page/` in the example below)
- `{testFileName}` - Test file name (with extension) (e.g.
  `page-click.spec.ts` in the example below)
- `{testFilePath}` - Relative path from `testDir` to test file path
  (e.g. `page/page-click.spec.ts` in the example below)
- `{ext}` - snapshot extension (with dots)
- `{arg}` - joined snapshot name parts, without extension (e.g.
`foo/bar/baz` in the example below)
- `{snapshotSuffix}` - `testInfo.snapshotSuffix` value.

Consider the following file structure:

```
playwright.config.ts
tests/
└── page/
    └── page-click.spec.ts
```

The following `page-click.spec.ts`:

```ts
// page-click.spec.ts
import { test, expect } from '@playwright/test';

test('should work', async ({ page }) => {
  await expect(page).toHaveScreenshot(['foo', 'bar', 'baz.png']);
});
```

Fixes #7792
2022-11-09 15:29:07 -08:00
github-actions[bot] 63a0b75186
chore(driver): roll driver to recent Node.js LTS version (#18636) 2022-11-08 03:31:27 -08:00
Yury Semikhatsky d5494edf71
feat(runner): TestOptions.storageStateName (#18587) 2022-11-07 16:27:38 -08:00
Yury Semikhatsky 25dc0bfacb
feat(runner): change storage fixture to TestInfo.storage() (#18584) 2022-11-04 14:28:25 -07:00
Dmitry Gozman 6fef227f43
feat(test runner): test.reset() to reset options to default/config value (#18561) 2022-11-04 09:03:29 -07:00
Yury Semikhatsky 45aa82242d
feat(runner): storage fixture (#18522) 2022-11-02 20:22:35 -07:00
Dmitry Gozman 8292398692
docs: support custom hrefs for api links (#18514) 2022-11-02 13:35:51 -07:00
Pavel Feldman 2183d9e9a2
chore: use codemirror for editor (#18482) 2022-11-01 15:04:30 -07:00
Pavel Feldman 4d53fd9c63
chore: download android driver from the cdn (#18466) 2022-10-31 16:08:26 -07:00
Yury Semikhatsky 7337dd4e28
chore: revert project.{stage,run} (#18462) 2022-10-31 14:04:24 -07:00
Max Schmitt 490513a017
devops: update repo for internal tests 2022-10-30 21:33:30 -07:00
Dmitry Gozman 2d3b2a0768
feat(test runner): test.describe.configure({ retries, timeout }) (#18388)
References #10825.
2022-10-27 15:53:27 -07:00
github-actions[bot] 02499cf589
chore(driver): roll driver to recent Node.js LTS version (#18333)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-26 08:12:39 -07:00
Max Schmitt 5d99719f5d
chore: use Node.js 18 for Docker images (#18334)
Node.js 18 is now LTS and we follow LTS schedule.
2022-10-26 08:11:20 -07:00
Max Schmitt 805312b722
feat(android): add Android.{launchServer,connect} (#18263)
Fixes https://github.com/microsoft/playwright/issues/17538
2022-10-24 17:23:11 -07:00
Yury Semikhatsky 11eb719d13
feat(runner): project run: "always" (#18160)
Projects marked with `run: 'always'` are non shard-able and run after
failures.
2022-10-18 17:18:45 -07:00
Pavel Feldman 739b64a09a
chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07:00
github-actions[bot] 3f2d58eeec
chore(driver): roll driver to recent Node.js LTS version (#18055)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-13 14:33:07 +03:00
Yury Semikhatsky 08a3a269cd
feat(runner): project.canShard (#18037) 2022-10-12 14:34:22 -07:00
Yury Semikhatsky 3b8f63d703
feat(runner): project.stopOnFailure (#18009) 2022-10-11 17:04:01 -07:00
Yury Semikhatsky 3592269caf
feat(runner): project.stage (#17971) 2022-10-10 17:56:18 -07:00