286 Commits

Author SHA1 Message Date
Pavel Feldman
411f938296
chore: clean up git commit metadata props and UI (#34867) 2025-02-25 09:21:17 -08:00
Simon Knott
a9bbf4b56d
docs: recommend localhost over 127.0.0.1 (#34918) 2025-02-25 15:40:38 +01:00
Max Schmitt
3584e72223
chore: remove 'as *' imports because of esModuleInterop: true (#34854) 2025-02-19 15:32:12 +01:00
Simon Knott
b7785e1662
feat(runner): enable gitCommitInfo by default on GH Actions (#34743) 2025-02-12 14:51:00 +01:00
Simon Knott
8ed2f4319e
chore: add pageSnapshot option (#34669) 2025-02-11 11:04:57 -08:00
Pavel Feldman
d5d47f2b6e
chore: organize imports in packages (#34681) 2025-02-07 14:44:00 -08:00
Yury Semikhatsky
7f09ba7fa4
feat: step.attach() (#34614) 2025-02-05 12:27:44 -08:00
Adam Gastineau
50f22f13a4
docs: document config executing multiple times (#34576) 2025-02-05 06:10:32 -08:00
Yury Semikhatsky
a1451c75f8
feat: conditional step.skip() (#34578) 2025-01-31 15:45:57 -08:00
Dmitry Gozman
ba650161a8
feat: per-assertion snapshot path template in config (#34537) 2025-01-29 18:47:20 +00:00
Dmitry Gozman
24f06ec1bf
feat(html report): show metadata (#34517) 2025-01-29 16:22:50 +00:00
Vitaliy Potapov
61d595ae48
feat: add new config prop populateGitInfo (#34329)
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2025-01-28 07:54:31 +00:00
Adam Gastineau
256dc47833
docs: switch gracefulShutdown to primarily mention SIGTERM and add Docker comment (#34430) 2025-01-22 09:49:34 -08:00
Yury Semikhatsky
372d4196d7
chore: step timeout improvements (#34386) 2025-01-17 21:15:47 -08:00
Yury Semikhatsky
275f334b58
chore(step): remove step.fail and step.fixme, add step.skip (#34326) 2025-01-14 17:43:47 -08:00
Pavel Feldman
fe96104ce2
docs: clarify updateSourceMethod (#34314) 2025-01-13 18:25:32 -08:00
Simon Knott
6bdd2694ee
feat(webserver): customize shutdown with new gracefulShutdown option (#34130)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-01-03 11:34:34 +01:00
Yury Semikhatsky
7ed60ccf7f
feat(test): step.fail and step.fixme modifiers (#34042) 2024-12-17 11:17:22 -08:00
Simon Knott
f6f6a6225c
docs: locale defaults to en-us (#33840) 2024-12-05 15:44:41 -08:00
Pavel Feldman
971b5da741
chore: introduce update-source-method (#33738) 2024-11-22 18:30:35 -08:00
Pavel Feldman
66d9f3acbe
chore: introduce update-snapshots=changed (#33735) 2024-11-22 17:41:31 -08:00
Yury Semikhatsky
5203c780ae
feat: step timeout option (#33560) 2024-11-13 11:17:54 -08:00
Max Schmitt
9eb4fe5546
feat(pwt): serialize and expose Error.cause from Worker process (#32833) 2024-10-29 00:01:59 +01:00
Dmitry Gozman
2e01154bb5
feat: screenshot:on-first-failure (#33266) 2024-10-24 04:41:35 -07:00
Simon Knott
0d63df4875
feat(test runner): allow multiple global setups (#32955)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-18 11:03:00 +02:00
Pengoose
d10a5e5693
feat(testType): add support for test.fail.only method (#33001) 2024-10-16 06:47:23 -07:00
Dmitry Gozman
25dd9b5cd4
feat: config.build.tsconfig (#33026)
Allows to specify `tsconfig` in the configuration file, which applies to
test files but not the config file itself.

Fixes #32808.
2024-10-10 01:37:46 -07:00
Dmitry Gozman
c2cbf26497
docs: refresh timeouts doc (#33025)
After changes a few releases ago, specify that `afterEach` hooks are
included in a separate timeout.

Fixes #32851.
2024-10-09 05:10:10 -07:00
Yury Semikhatsky
e8d08e8d1e
docs: more prominent note on tags being read-only (#32836)
Reference https://github.com/microsoft/playwright/issues/32828
2024-09-26 09:41:38 -07:00
Dmitry Gozman
d07f6cfc5c
docs: check that description has an empty line before it (#32830) 2024-09-26 06:31:42 -07:00
Dmitry Gozman
e5433d0576
chore(docs): validate params/options links (#32820)
Also supports fully-qualified links like this:
```
[`option: BrowserType.launch.headless`]
```

References https://github.com/microsoft/playwright/issues/32590.
2024-09-26 01:08:16 -07:00
Max Schmitt
523ec83cad
chore: move Location type from testReporter.d.ts to test.d.ts (#32687) 2024-09-18 16:57:11 +02:00
오소현
8761dafc73
feat(test runner): allow to pass arbitrary location to test.step (#32504)
Fixes https://github.com/microsoft/playwright/issues/30160

### Description:
This pull request introduces the ability to specify custom locations for
test steps in Playwright. By enabling the provision of arbitrary
locations to the test.step method, it resolves the limitation where
helper methods obfuscate the original call site, providing more accurate
and meaningful location data in test reports.

### Motivation:
To enhance the utility and clarity of test reports in Playwright.
Specifically, it addresses the need to trace test steps back to their
precise location in the code, which is especially important when steps
are abstracted in helper functions. This feature is crucial for
maintaining accurate documentation and facilitating debugging processes.

### Changes:
Added functionality to pass a custom location object to test.step.

### Expected Outcome:
This PR is expected to significantly improve the precision and
usefulness of diagnostic data in test reports by allowing specific
locations within helper functions to be accurately documented. It
facilitates better tracking of test executions and simplifies the
debugging process, making it easier for developers to understand and
address issues within complex tests.

### References:
Closes https://github.com/microsoft/playwright/issues/30160 -
"[Feature]: allow to pass arbitrary location to test.step"

**Code Check**
I conducted tests on this new feature by integrating it into some
existing test codes, and it worked well. I will attach the code used for
testing and a screenshot showing the successful outcome.

<details>
<summary>toggle dropdown</summary>
<div markdown="1">

```
import type { Location } from '../../../packages/playwright/types/testReporter'
...
test('should respect the back button', async ({ page }) => {
    await page.locator('.todo-list li .toggle').nth(1).check();
    await checkNumberOfCompletedTodosInLocalStorage(page, 1);
...
    await test.step('Showing active items', async () => {
      await page.getByRole('link', { name: 'Active' }).click();
    }, {location});
```

<img width="1109" alt="image"
src="https://github.com/user-attachments/assets/359feafa-0949-4c71-9426-46debef21bdd">
</div>
</details>
2024-09-17 08:11:21 -07:00
Yury Semikhatsky
a4bd551597
docs: TestInfo.titlePath does not include project (#32548) 2024-09-10 16:52:12 -07:00
Pavel Feldman
6d5889a52c
chore: revert the matcherResult in API (#32524) 2024-09-09 16:44:32 -07:00
Pavel Feldman
a52eb0c9a0
chore: expose matcherResult on TestError (#32455) 2024-09-05 21:36:51 -07:00
Max Schmitt
c4862c022c
chore: client certificates api review (#31826) 2024-07-23 22:56:36 +02:00
Josh Soref
7abbbd0c84
docs: spelling (#31779)
Fixes misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling).

The misspellings have been reported at
https://github.com/jsoref/playwright/actions/runs/10015023629#summary-27685777352

The action will report that the changes in this PR would make it happy:
https://github.com/jsoref/playwright/actions/runs/10015023971#summary-27685778305

---

I understand that the commit messages will need to be reworded to match
house style. For the time being, these are merely noting the changes
they contain so that when I rebase or need to drop things, I can. --
I've already rebased once as someone fixed one of the items that my
draft work was going to fix.

---

## Testing
* The tests _mostly_ passed when I managed to trigger them, but there
were a handful of things that I didn't quite understand
* There are a large number of warnings relating to a bad interaction
between any workflow that uses this local action
b535139b32/.github/actions/run-test/action.yml (L74-L80)
and the action it calls -- I've opened Azure/login#474 asking them to
refactor their action so that it doesn't cause so much noise while
running this repository's tests
* I'm vaguely curious as to why this repository has a `branch`
constraint for its `pull_request` events in its workflows -- that
constraint gave me a number of additional headaches while trying to
prepare this branch for this PR.

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-07-22 06:45:22 -07:00
Jorge Caridad
fb59e6372b
docs: fix typos in various documentation files (#31656) 2024-07-12 10:24:52 -07:00
Max Schmitt
9569cb5c1e
feat: support client certificates (#31529)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-12 11:42:24 +02:00
Pavel Feldman
cf400a6080
Revert "feat(test runner): shuffle order of tests with sharding seed … (#31260)
…(#30817)"
2024-06-11 16:05:35 -07:00
Pavel Feldman
732e7393d3
Revert "feat(test): add URL field to annotations for hyperlink disp… (#31259)
…lay (#30665)"
2024-06-11 16:05:21 -07:00
Matthijs Kok
b60f99db36
docs(class-testproject): fix 'use' type reference (#31200) 2024-06-10 16:22:54 -07:00
Pavel Feldman
f97d87ea5a
docs: fix the api review typos (#31071) 2024-05-30 12:15:52 -07:00
Max Schmitt
63fd28e038
docs(grep): contains tags (#31042) 2024-05-28 19:30:47 +02:00
Ernst de Jong
ef023c4f40
chore(types): fix typo in screenshot mode (#31047) 2024-05-28 16:14:21 +02: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
Mathias Leppich
825e0e466e
feat(test runner): shuffle order of tests with sharding seed (#30817) 2024-05-22 16:22:09 -07:00
오소현
165ecac5df
feat(test): add URL field to annotations for hyperlink display (#30665) 2024-05-21 12:46:38 -07:00
Viktor Szépe
150cbcbdf3
chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00