docs: update v1.51 js release notes (#34979)

This commit is contained in:
Dmitry Gozman 2025-02-28 19:29:13 +00:00 committed by GitHub
parent c22c10f7d8
commit 2dd541bc59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -40,16 +40,20 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
});
```
* Set `gitCommit: 'generate'` property in [`property: TestConfig.metadata`] to capture git information that will be shown in a test report.
* Set option [`property: TestConfig.captureGitInfo`] to capture git information into [`property: TestConfig.metadata`].
```js title="playwright.config.ts"
import { defineConfig } from '@playwright/test';
export default defineConfig({
metadata: { gitCommit: 'generate' },
captureGitInfo: { commit: true, diff: true }
});
```
HTML report will show this information when available:
![Git information in the report](https://github.com/user-attachments/assets/9ca4a05a-1485-4521-826b-50568babec3f)
### Test runner
* A new [TestStepInfo] object is now available in test steps. You can add step attachments or skip the step under some conditions.