cherry-pick(#29034): docs: fix typo for stylePath (#29035)

This PR cherry-picks the following commits:

- a217d6a08d

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Playwright Service 2024-01-18 01:06:32 -08:00 committed by GitHub
parent ece2a97702
commit 4d9f923dfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ import { test, expect } from '@playwright/test';
test('example test', async ({ page }) => {
await page.goto('https://playwright.dev');
await expect(page).toHaveScreenshot({ styleFile: path.join(__dirname, 'screenshot.css') });
await expect(page).toHaveScreenshot({ stylePath: path.join(__dirname, 'screenshot.css') });
});
```
@ -109,7 +109,7 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
expect: {
toHaveScreenshot: {
styleFile: './screenshot.css'
stylePath: './screenshot.css'
},
},
});