Skip to content

Commit

Permalink
cherry-pick(#35050): docs: update Git information image in release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
debs-obrien authored and pavelfeldman committed Mar 5, 2025
1 parent 72622fe commit 224385a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions docs/src/release-notes-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

## Version 1.51

### Highlights
### StorageState for indexedDB

* New option [`option: BrowserContext.storageState.indexedDB`] for [`method: BrowserContext.storageState`] allows to save and restore IndexedDB contents. Useful when your application uses [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) to store authentication tokens, like Firebase Authentication.

Expand All @@ -29,11 +29,15 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
});
```

* New "Copy as Prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.
### Copy as prompt

New "Copy as Prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.

![Copy as Prompt](https://github.com/user-attachments/assets/f3654407-dd6d-4240-9845-0d96df2bf30a)

* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
### Filter visible elements

New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.

```js title="example.spec.ts"
test('some test', async ({ page }) => {
Expand All @@ -44,7 +48,9 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
});
```

* Set option [`property: TestConfig.captureGitInfo`] to capture git information into [`property: TestConfig.metadata`].
### Git information in HTML report

Set option [`property: TestConfig.captureGitInfo`] to capture git information into [`property: TestConfig.metadata`].

```js title="playwright.config.ts"
import { defineConfig } from '@playwright/test';
Expand All @@ -56,11 +62,11 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

HTML report will show this information when available:

![Git information in the report](https://github.com/user-attachments/assets/9ca4a05a-1485-4521-826b-50568babec3f)
![Git information in the report](https://github.com/user-attachments/assets/f5b3f6f4-aa08-4a24-816c-7edf33ef0c37)

### Test runner
### Test Step improvements

* A new [TestStepInfo] object is now available in test steps. You can add step attachments or skip the step under some conditions.
A new [TestStepInfo] object is now available in test steps. You can add step attachments or skip the step under some conditions.

```js
test('some test', async ({ page, isMobile }) => {
Expand Down

0 comments on commit 224385a

Please sign in to comment.