export declare const playwrightUtilsDocs = "\nYou can refer to the following recipes to learn how to write or diagnose tests for different scenarios.\n\n\n\nThe playwright-utils package provides fixtures that wrap around Playwright's built-in\n`page`, `context` fixtures to provide a mouse highlighter (which makes it easier to\nsee actions taken in a video).\n\nTo use this, you can use the `baseTestFixture` and `extendExpect` imports\nin your fixtures file.\n\n```ts\nimport { test as base, expect as baseExpect } from \"@playwright/test\";\nimport { baseTestFixture, extendExpect } from \"@empiricalrun/playwright-utils/test\";\n\nexport const test = baseTestFixture(base);\nexport const expect = extendExpect(baseExpect);\n```\n\n### Get a new browser context\n\nThis package provides a fixture `customContextPageProvider` which is a good way to create\na fresh, new browser context, and a page inside it.\n\nThere are two benefits of using this to create contexts or pages:\n1. Videos get recorded and attached to the test report\n2. Mouse highlights are available\n\n```ts\nimport { test, expect } from \"./fixtures\";\n\ntest(\"Example test\", async ({ page: builtInPage, customContextPageProvider }) => {\n // builtInPage is from default browser context\n const { page: newPage, context } = await customContextPageProvider();\n // newPage is from this other browser context\n});\n```\n\ncustomContextPageProvider can accept options to customize the browser context.\n\n```\n customContextPageProvider: (\n options?: BrowserContextOptions,\n ) => Promise<{ context: BrowserContext; page: Page }>;\n```\n\nFor example, pass { storageState: undefined } to create a new browser context without\nthe auth state of the current browser context. This is useful for multi-user scenarios.\n\n\n\n\n\n# Video Labels\n\nPages generate video recordings after test execution, with 1 page generating 1 video file (webm). \n\nIf your test case relies on multiple pages (e.g. for multi-user or multi-app flows), it can get difficult to\nknow which page does \"video-1.webm\" belong to.\n\nTo solve this, you should set video labels for pages. This will enable you to identify videos faster.\n\n## Usage\n\n```typescript\nimport { setVideoLabel } from '@empiricalrun/playwright-utils/test';\n\ntest('my test', async ({ page }) => {\n setVideoLabel(page, 'checkout-flow');\n // Video will be saved as 'checkout-flow.webm'\n});\n```\n\n## Multiple Contexts\n\n```typescript\ntest('multi-user scenario', async ({ page, customContextPageProvider }) => {\n setVideoLabel(page, 'host-page');\n\n const { page: guestPage } = await customContextPageProvider({ storageState: undefined });\n setVideoLabel(guestPage, 'guest-page');\n // Videos saved as 'guest-page.webm' and 'host-page.webm'\n});\n```\n\n## Notes\n\n- The default behavior is to label videos for multiple pages as: `video-0.webm`, `video-1.webm`, etc.\n- If setVideoLabel is called twice for the same page, the last label will be set\n\n\n\n"; //# sourceMappingURL=pw-utils-docs.d.ts.map