docs: add missing imports (#29014)

This commit is contained in:
inottn 2024-01-17 15:11:55 +08:00 committed by GitHub
parent 1db18711a2
commit 0fa85143a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -101,7 +101,8 @@ Playwright can emulate various devices by specifying `setDeviceScaleFactor`, `se
The viewport is included in the device but you can override it for some tests with [`method: Page.setViewportSize`]. The viewport is included in the device but you can override it for some tests with [`method: Page.setViewportSize`].
```js tab=js-test title="playwright.config.ts" ```js tab=js-test title="playwright.config.ts"
import { defineConfig } from '@playwright/test'; import { defineConfig, devices } from '@playwright/test';
export default defineConfig({ export default defineConfig({
projects: [ projects: [
{ {
@ -245,7 +246,7 @@ await using var context = await browser.NewContextAsync(new()
Whether the meta viewport tag is taken into account and touch events are enabled. Whether the meta viewport tag is taken into account and touch events are enabled.
```js title="playwright.config.ts" ```js title="playwright.config.ts"
import { defineConfig } from '@playwright/test'; import { defineConfig, devices } from '@playwright/test';
export default defineConfig({ export default defineConfig({
projects: [ projects: [