302 Commits

Author SHA1 Message Date
Dmitry Gozman
0e964e2b99
chore: remove FullConfig.failOnFlakyTests (#35541) 2025-04-08 17:13:54 +01:00
Adam Gastineau
92c5d656ab
chore: add location named property to annotations (#35373) 2025-04-02 06:29:22 -07:00
Jean-François Greffier
468ea7672d
docs: improve execution modes (#35412)
Signed-off-by: Jean-François Greffier <jfgreffier@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-04-01 10:00:04 +01:00
Jean-François Greffier
85a66912c6
feat(config): failOnFlakyTests option (#35109) 2025-03-11 10:06:20 -07:00
Pavel Feldman
8f5b8c10c6
chore: sort web server properties (#35135) 2025-03-11 10:05:13 -07:00
Pengoose
43ee924087
feat(webServer): support name option for custom web server log prefixes (#35105) 2025-03-10 19:12:59 -07:00
Dmitry Gozman
4767845f20
feat: support TestProject.workers limit (#35094) 2025-03-10 09:13:24 +00:00
Pavel Feldman
319f4630de
chore: do not compute git diff on PRs (#35062) 2025-03-05 20:43:27 -08:00
Yury Semikhatsky
9e76b3695c
docs: update more step.skip() examples (#35052) 2025-03-05 08:38:05 -08:00
Debbie O'Brien
a3fafb60d4
docs: update step example (#35051) 2025-03-05 08:28:47 -08:00
Yury Semikhatsky
4a79c214f0
chore: address step.skip() API review comments (#34958) 2025-02-28 09:32:04 -08:00
Pavel Feldman
e033e5aa11
chore: move captureGitInfo back into config (#34961) 2025-02-28 07:33:03 -08:00
Simon Knott
6dcb7d2bf5
chore: remove pageSnapshot option (#34962)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-02-28 13:16:58 +01:00
Dmitry Gozman
934e123d1b
docs: update step.skip docs after api review (#34968) 2025-02-28 10:17:39 +00:00
Dmitry Gozman
08ea36caa2
chore: default reportSlowTests to 5 minutes (#34950) 2025-02-27 16:31:32 +00:00
Pavel Feldman
cd23a224f6
chore: another iteration on gitCommit/gitDiff props (#34926) 2025-02-26 08:40:30 -08:00
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