Commit graph

2276 commits

Author SHA1 Message Date
Pavel 935aa0493c docs: do not use html cards with scripts 2024-06-01 07:43:11 -07:00
Pavel Feldman fc6c67f5f9
docs: start adding clock docs (#31111) 2024-06-01 07:30:58 -07:00
Pavel Feldman 8bfd0eb6e4
chore: introduce clock test mode (#31110) 2024-05-31 14:44:26 -07:00
Pavel Feldman 76e977a934
chore: add clock.next() (#31097) 2024-05-31 08:09:24 -07:00
Pavel Feldman f97d87ea5a
docs: fix the api review typos (#31071) 2024-05-30 12:15:52 -07:00
Yury Semikhatsky 6067b78f88
chore: http credentials send immeidately/unauthorized enum (#31076)
Reference https://github.com/microsoft/playwright-internal/issues/205
Reference https://github.com/microsoft/playwright/issues/30534
2024-05-30 10:19:56 -07:00
Pavel Feldman 170c457a61
feat(timers): a stab at fake timers (#31075) 2024-05-30 09:38:27 -07:00
Debbie O'Brien 141c6a9c81
docs: add video on running tests (#31066) 2024-05-29 17:19:49 +02:00
Xan 61203964a8
docs: remove uneeded sentence in docs (#31053)
"To learn more about generating tests check out or detailed guide on
Codegen."

Should it be 'our'? And why does it link back to itself? Should be
removed.

Signed-off-by: Xan <57809064+devxan@users.noreply.github.com>
2024-05-28 13:41:38 -07:00
Max Schmitt 63fd28e038
docs(grep): contains tags (#31042) 2024-05-28 19:30:47 +02:00
Max Schmitt 1fafbe580c
docs(test-cli): remove --tag from docs (#31041)
Fixes https://github.com/microsoft/playwright/issues/31038
2024-05-28 09:08:34 -07:00
Ernst de Jong ef023c4f40
chore(types): fix typo in screenshot mode (#31047) 2024-05-28 16:14:21 +02:00
Joonas Häkkinen a300a15afe
docs(test-fixtures): fix minor grammar mistake (#31046) 2024-05-28 14:17:34 +02:00
cavivie a7599ad509
feat(api): add host option in launchServer options (#30999) 2024-05-27 11:24:23 +02:00
Debbie O'Brien af46dbef53
docs: update vs code doc extension updates (#30968) 2024-05-24 09:30:37 -07:00
Yury Semikhatsky a106428114
feat(config): respectGitIgnore option (#30972)
Fixes https://github.com/microsoft/playwright/issues/30553
2024-05-23 12:05:02 -07:00
Debbie O'Brien 7ead708902
docs: add release video (#30964) 2024-05-23 10:32:08 +02:00
Mathias Leppich 825e0e466e
feat(test runner): shuffle order of tests with sharding seed (#30817) 2024-05-22 16:22:09 -07:00
Matt Marsh d048ee4f5b
docs(cli): correct CLI grep documentation (#30940)
The documentation for command line usage of `--grep` did not provide the
correct string used for comparisons. This has now been fixed to include
the project name.

Fixes #30895
2024-05-22 16:05:20 -07:00
Olaf Alders 5b00ce1594
docs: fix typo in ConsoleMessage class (#30857) 2024-05-22 13:31:14 +02:00
오소현 165ecac5df
feat(test): add URL field to annotations for hyperlink display (#30665) 2024-05-21 12:46:38 -07:00
Debbie O'Brien 47185b743b
docs: add last failed to running tests (#30730) 2024-05-21 12:37:39 -07:00
Cornelius Roemer 822cba2e2b
docs(actionability.md): fix grammar (#30756) 2024-05-21 12:35:17 -07:00
Matt Marsh 68abd36464
docs: add detail on dot reporter output (#30939)
docs: detail on how to interpret dot reporter output added.

Fixes #30908
2024-05-21 12:06:05 -07:00
Dmitry Gozman 6290af3a08
feat(reporters): align and document environment variables (#30912)
- Documents `PLAYWRIGHT_FORCE_TTY` and `FORCE_COLOR` across terminal
reporters.
- New `PLAYWRIGHT_LIST_PRINT_STEPS`. Removes undocumented test-only
`PW_TEST_DEBUG_REPORTERS_PRINT_STEPS`.
- Replaces `PLAYWRIGHT_HTML_REPORT` with `PLAYWRIGHT_HTML_OUTPUT_DIR`
and `PW_TEST_HTML_REPORT_OPEN` with `PLAYWRIGHT_HTML_OPEN` for
consistency, supports older versions for backwards compatibility.
- New `PLAYWRIGHT_HTML_HOST`, `PLAYWRIGHT_HTML_PORT` and
`PLAYWRIGHT_HTML_ATTACHMENTS_BASE_URL`.
- New `PLAYWRIGHT_JUNIT_STRIP_ANSI` and
`PLAYWRIGHT_JUNIT_INCLUDE_PROJECT_IN_TEST_NAME`.
- Removes `PW_HTML_REPORT` that was set for unknown reason.
2024-05-21 10:46:52 -07:00
Atmaram Naik 7fd3539ebd
docs(intro): adds all three package manager commands (#30884) 2024-05-20 16:14:35 +02:00
Max Schmitt 9188ff7917
docs: add release-notes for language ports (#30868) 2024-05-17 23:18:16 +02:00
Joe-Hendley 6ae5cd3824
feat: implement flag to fail flaky tests (#30618)
Implements feature requested in
https://github.com/microsoft/playwright/issues/30457

The test runner treats flaky tests as failures when the flag is enabled,
but still reports flaky tests as flaky in the reporting interface. It
feels like something worth discussing as this behaviour makes sense to
me, but looked a bit odd to @BJSS-russell-pollock when I ran this past
him.

Closes #30457.
2024-05-15 09:10:10 -07:00
Max Schmitt 79d2fcfc20
docs(python): fix browser.context snippet (#30759)
Signed-off-by: Max Schmitt <max@schmitt.mx>
2024-05-14 15:36:17 +01:00
Dmitry Gozman 776b04e5ea
feat: APIRequestContext dispose reason (#30765)
Similarly to page.close, we pass test-runner specific reason to
facilitate better error messages.

```
  1) a.test.ts:10:11 › test

    Error: apiRequestContext.fetch: Fixture { request } from beforeAll cannot be reused in a test.
      - Recommended fix: use a separate { request } in the test.
      - Alternatively, manually create APIRequestContext in beforeAll and dispose it in afterAll.
    See https://playwright.dev/docs/api-testing#sending-api-requests-from-ui-tests for more details.

       9 |
      10 |       test('test', async () => {
    > 11 |         await context.fetch('http://example.com');
         |                       ^
      12 |       });
      13 |
```

Closes #29260.
2024-05-13 18:51:30 -07:00
Max Schmitt f2441eb4b5
docs(dotnet): roll fixes (#30771) 2024-05-13 15:56:14 -07:00
Yury Semikhatsky e728e90944
docs: waitForResponse method predicate example (#30739)
Fixes https://github.com/microsoft/playwright/issues/30731
2024-05-10 09:22:59 -07:00
Debbie O'Brien 10da0801e3
docs(dotnet): improve trace viewer (#30716) 2024-05-09 20:34:01 +02:00
Dmitry Gozman a5d384c1f6
docs: add section explaining scrolling (#30719)
Fixes #30643.
2024-05-08 21:04:05 -07:00
Debbie O'Brien 54cf6559b4
docs: fix intro whats next codgen link (#30714) 2024-05-08 22:55:44 +02:00
Debbie O'Brien 4f84ae31bd
docs(dotnet): improve trace viewer intro (#30671) 2024-05-08 20:01:47 +01:00
Viktor Szépe 150cbcbdf3
chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
Sander 4b5ecd2d79
docs(ct): remove router faq (#30663) 2024-05-08 18:40:12 +01:00
Christophe Chauvot ddeec35450
docs(release-notes): Fixed typo in 1.44 js notes (#30647) 2024-05-08 17:41:53 +01:00
Max Schmitt 5babb37f19
docs(python): roll fixes (#30708) 2024-05-08 08:44:28 -07:00
Michael Render 81e907f4c1
docs(dotnet): fix isMobile in snippet (#30699) 2024-05-07 22:34:55 +01:00
ggorlen 2d7b1480b2
docs(reporters): wrap reporter in array, fixing typo in docs (#30686) 2024-05-07 11:16:21 +00:00
Debbie O'Brien 5d21e3729c
docs: fix example for accessible description (#30672) 2024-05-06 10:11:45 -07:00
Max Schmitt d9d760705a
docs: fix broken links which broke build (#30651)
Fixes https://github.com/microsoft/playwright.dev/pull/1370
Fixes https://github.com/microsoft/playwright/pull/30648
2024-05-03 16:35:18 +00:00
Debbie O'Brien c086b09f7e
docs: add new video on generating tests (#30631) 2024-05-03 16:21:51 +02:00
Yury Semikhatsky d5b387159a
feat(fetch): sendImmediately (#30627)
Fixes https://github.com/microsoft/playwright/issues/30534
2024-05-02 16:30:12 -07:00
Debbie O'Brien bf11c95d58
docs: improve dotnet getting started (#30594) 2024-05-02 12:06:39 +02:00
Philipp Daun 702bafdd88
docs: add third-party GitHub pull request reporter (#30454)
Add a new third-party reporter: [Playwright Report Comment
Action](https://github.com/marketplace/actions/playwright-report-comment).

A GitHub action that comments report summaries on pull requests.

Screenshots visible in the action readme and below.


![Screenshot](https://github.com/daun/playwright-report-summary/raw/main/assets/comment-passed.png)


![Screenshot](https://github.com/daun/playwright-report-summary/raw/main/assets/comment-failed.png)

Signed-off-by: Philipp Daun <post@philippdaun.net>
2024-05-01 13:28:23 -07:00
Kawahara Shotaro 4e2ea2280c
docs: Add pnpm as an install option for Playwright (#30601)
This pull request adds pnpm as an install option for Playwright.
Previously, only npm and yarn were listed as installation options.
2024-05-01 13:01:33 -07:00
Yury Semikhatsky 3b7c4fac22
chore: add common env vars for junit and json reporters (#30611) 2024-05-01 10:16:49 -07:00
Dmitry Gozman c3d8b22198
docs: mention that globalSetup does not respect config options (#30609)
Closes #30605.
2024-04-30 09:01:44 -07:00
Yury Semikhatsky fa7d4e5143
docs: releae notes 1.44 for js (#30596) 2024-04-29 16:48:40 -07:00
Yury Semikhatsky b9f70f4ac4
docs(junit): document existing options and env (#30595) 2024-04-29 11:29:15 -07:00
Pavel Feldman 96f3d19819
feat(ctrl_or_meta): add a universal ctrl-meta modifier (#30572)
Fixes https://github.com/microsoft/playwright/issues/12168
2024-04-29 08:15:12 -07:00
Harsh Gupta ebafb95054
docs(python): fix CDPSession documentation example (#30584) 2024-04-29 10:58:59 +00:00
Yury Semikhatsky 1f63cbff08
docs: toHaveUrl.ignoreCase in languages (#30573) 2024-04-26 15:02:51 -07:00
Yury Semikhatsky 3643fd456b
feat: outputFile option and PLAYWRIGHT_BLOB_OUTPUT_FILE env for blob (#30559)
Reference https://github.com/microsoft/playwright/issues/30091
2024-04-26 09:33:53 -07:00
Yury Semikhatsky ae9345d0bd
docs: add FormData to the examples (#30557) 2024-04-25 16:31:27 -07:00
Dmitry Gozman 6d20da568e
feat: expect(locator).toHaveRole(role) (#30555)
References #13517. Fixes #18332.
2024-04-25 15:26:10 -07:00
Yury Semikhatsky 9a1b34a4b0
Revert "fix: shut down workers before reporter.onEnd (#30329)" (#30551)
This reverts commit 3cea17abb6.

Reference https://github.com/microsoft/playwright/issues/30550

The test is preserved but marked as fixme.
2024-04-25 14:21:54 -07:00
Dmitry Gozman 9bd2aea130
feat(locator handler): address api review feedback (#30554)
- Remove `handler` argument from `removeLocatorHandler`.
- Rename `allowStayingVisible` into `noWaitAfter`.
- Improve logging related to locator handler.
- Remove experimental badges.
2024-04-25 14:00:02 -07:00
Pavel Feldman 14413148f4
chore: document --last-failed (#30544)
drive-by: undocument --browser
2024-04-25 12:29:51 -07:00
Yury Semikhatsky 1cfa64343a
docs: describe report name configuration (#30547)
Reference https://github.com/microsoft/playwright/issues/30091
2024-04-25 10:15:25 -07:00
Dmitry Gozman 59689c9c97
feat(addLocatorHandler): various improvements (#30494)
- Automatically waiting for the overlay locator to be hidden, with
`allowStayingVisible` opt-out.
- `times: 1` option.
- `removeLocatorHandler(locator, handler)` method.
- Passing `locator` as first argument to `handler`.

Fixes #30471. Fixes #30424. Fixes #29779.
2024-04-24 15:19:12 -07:00
Yury Semikhatsky e2f7acea1e
docs: fix capitalization and alphabetic order in TestConfig (#30523) 2024-04-24 15:18:43 -07:00
Yury Semikhatsky f1f3929a67
chore: get rid of ConfigInWorker, use FullConfig instead (#30517)
Addressing API review feedback.
2024-04-24 14:14:05 -07:00
Max Schmitt 1b7e097b68
docs(python): add docs for new_context fixture (#30522)
https://github.com/microsoft/playwright-internal/issues/202
2024-04-24 22:40:38 +02:00
Yury Semikhatsky 4e086e6df8
docs: update type property description (#30516) 2024-04-24 13:10:17 -07:00
Dmitry Gozman 8fc7723f22
fix(types): allow any return type from event handlers (#30492)
Closes #29353.
2024-04-24 09:25:43 -07:00
Yury Semikhatsky 230a8437d3
feat(fetch): support FormData as multipart parameter (#30489)
Reference https://github.com/microsoft/playwright/issues/28070
2024-04-23 17:05:27 -07:00
Yury Semikhatsky 67c430435a
docs: more accurate test id description (#30487)
Reference https://github.com/microsoft/playwright/issues/30430
2024-04-23 14:07:37 -07:00
Dmitry Gozman 02c0706896
docs: do not recommend waitForLoadState (#30483)
Instead, just perform an action and auto-waiting will handle it.

Closes #30236.
2024-04-23 09:22:58 -07:00
Dmitry Gozman b0fbe058ae
feat: TestProject.ignoreSnapshots (#30466) 2024-04-22 16:16:38 -07:00
Dmitry Gozman 4a275b8eca
feat: expect(locator).toHaveAccessibleDescription (#30463)
References #18332.
2024-04-22 12:33:30 -07:00
Dmitry Gozman eea1f9984f
feat: expect(locator).toHaveAccessibleName (#30420)
References #18332.
2024-04-18 12:28:55 -07:00
Yury Semikhatsky 3cea17abb6
fix: shut down workers before reporter.onEnd (#30329) 2024-04-16 09:49:11 -07:00
OKURA Masafumi af634c2e1b
Fix a grammar mistake in ui-mode doc (#30378) 2024-04-15 15:24:04 -07:00
Christopher Dunderdale f7e612fb4b
docs(auth): small improvement to .NET storageState example (#30313) 2024-04-15 10:32:12 +02:00
Max Schmitt 2b5488902a
docs(mock): fix typo (#30346)
Fixes https://github.com/microsoft/playwright/issues/30326
2024-04-11 11:37:44 -07:00
Max Schmitt 86cc252da2
docs: add v1.43 release notes for language ports (#30263) 2024-04-09 09:03:58 +02:00
Jean-François Greffier aef2d3879c
docs(components): fix hooks imports in components test examples (#30282) 2024-04-08 09:46:01 +02:00
Dmitry Gozman adc645d3cb
docs: note that sharding only works for parallel tests (#30272)
References #30253.
2024-04-05 11:05:20 -07:00
Yury Semikhatsky 7ad255301f
docs: fix C# and python snippets (#30232) 2024-04-04 13:49:15 -07:00
Dmitry Gozman 88f2717e87
docs: hint that popup main request is accessible through BrowserContext (#30249)
Fixes #30229.
2024-04-04 09:23:21 -07:00
Max Schmitt 010bc29a3c
chore: harden markdown link validation (#30221) 2024-04-03 17:51:32 +02:00
Yury Semikhatsky 63f876a335
chore: remove overrides for type and status (#30211)
Reference https://github.com/microsoft/playwright/issues/29768
2024-04-02 17:42:13 -07:00
Козынченко Вячеслав e58a33a0ae
feat(expect) - add ignoreCase option for toHaveURL (#30192)
feat(expect): add ignoreCase option for toHaveURL

Fixes #30057
2024-04-02 16:20:46 -07:00
Yury Semikhatsky 81bcf2a53b
docs: document FullReporter API (#30186)
* FullConfig split into FullConfig and ConfigInWorker
* FullProject split into FullProject and ProjectInWorker
* Tests can only access {Config, Project}InWorker, while reporters can
only access Full{Config,Project}. This will allow in the future to
change the reporter API independently from the tests.
* Added documentation for the 4 classes.
2024-04-02 16:15:02 -07:00
Yury Semikhatsky 39b3c93b85
docs: note about sharded projects in the merged config (#30184)
Fixes https://github.com/microsoft/playwright/issues/29841
2024-04-02 14:41:23 -07:00
Yury Semikhatsky 8056e5391f
docs: update context.backgroundPage event examples (#30210)
Fixes https://github.com/microsoft/playwright-java/issues/1530
2024-04-02 11:32:57 -07:00
Yury Semikhatsky 1602548c10
docs(java,csharp): add BrowserContext.backgroundPage(s) (#30200)
Refereence https://github.com/microsoft/playwright-java/issues/1530
2024-04-01 10:54:51 -07:00
Hansanto a950a7b86b
feat: Support intervals arg for toPass (#30037)
Fixes #30040

# Context

In the `playwright.config` file, we can custom the default `timeout`
property for `expect.toPass` by the property:

```ts title='playwright.config.ts'
export default defineConfig({
  // ...
  expect: {
    toPass: {
      timeout: 60_000,
    },
  },
});
```

However, we can't customize the `intervals` option. So the default value
is always `[100, 250, 500, 1000]`.

# Goal

Add the possibility to customize the intervals option from the
`playwright.config` file.

```ts title='playwright.config.ts'
export default defineConfig({
  // ...
  expect: {
    toPass: {
      timeout: 60_000,
      intervals: [1000, 2000, 3000]
    },
  },
});
```
2024-03-29 10:17:29 -07:00
Yury Semikhatsky 3001c9ac73
fix: preserve test declaration order in html and merged report (#30159)
* Add `Suite.entries` that returns tests and suites in their declaration
order
* Exposed `Suite.type` and `TestCase.type` for discriminating between
different entry types.
* Blob report format is updated to store entries instead of separate
lists for suites and tests.
* Bumped blob format version to 2, added modernizer.

Fixes https://github.com/microsoft/playwright/issues/29984
2024-03-29 10:12:33 -07:00
Pavel Feldman 4cce7e5bff
doc: document mocking read-only browser apis (#30122)
Documents https://github.com/microsoft/playwright/issues/30115
2024-03-26 14:20:20 -07:00
Dmitry Gozman 757f308475
docs: release notes 1.43 for js (#30128) 2024-03-26 13:25:00 -07:00
Yury Semikhatsky 021c5c108c
chore: revert support of duplicate form data fields in multipart post data (#30127)
We want to adopt FormData API for the requests.

This is a revert of 4b3c596874 and
a849ea9741

Reference https://github.com/microsoft/playwright/issues/28070
2024-03-26 12:36:35 -07:00
Julian Luis Almandos c27ec77d55
docs(test-projects-js.md): fix typo in "Test filtering" section (#30114) 2024-03-26 08:15:02 -07:00
Pavel Feldman 2de8a6b002
chore: move filter params into the clearCookies (#30111) 2024-03-26 08:12:26 -07:00
Yury Semikhatsky a849ea9741
feat(fetch): multiple fields with the same name in post data (#30104)
Rerefence https://github.com/microsoft/playwright/issues/28070
2024-03-25 15:39:45 -07:00
Yury Semikhatsky 4b3c596874
docs(fetch): multiple fields with the same name in java and .net (#30105)
Reference https://github.com/microsoft/playwright/issues/28070
2024-03-25 13:49:09 -07:00