docs(chrome-extensions): update test fixture grammar (#17770)

This commit is contained in:
Justin Kat 2022-10-04 06:18:01 -04:00 committed by GitHub
parent 253e3d2814
commit e2b5fc4f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ with sync_playwright() as playwright:
## Testing
To have the extension loaded when running tests you can use a test fixture to set the context. You can also dynamically retrieve the extension id and use it that to load and test the popup page for example.
To have the extension loaded when running tests you can use a test fixture to set the context. You can also dynamically retrieve the extension id and use it to load and test the popup page for example.
```ts
import { test as base, expect, BrowserContext } from "@playwright/test";
@ -201,4 +201,4 @@ def test_example_test(page: Page) -> None:
def test_popup_page(page: Page, extension_id: str) -> None:
page.goto(f"chrome-extension://{extension_id}/popup.html")
expect(page.locator("body")).to_have_text("my-extension popup")
```
```