(
browser: Browser, server: Server, assetdir: Path, tmp_path: Path
)
| 500 | |
| 501 | |
| 502 | async def test_should_round_trip_har_zip( |
| 503 | browser: Browser, server: Server, assetdir: Path, tmp_path: Path |
| 504 | ) -> None: |
| 505 | har_path = tmp_path / "har.zip" |
| 506 | context_1 = await browser.new_context( |
| 507 | record_har_mode="minimal", record_har_path=har_path |
| 508 | ) |
| 509 | page_1 = await context_1.new_page() |
| 510 | await page_1.goto(server.PREFIX + "/one-style.html") |
| 511 | await context_1.close() |
| 512 | |
| 513 | context_2 = await browser.new_context() |
| 514 | await context_2.route_from_har(har=har_path, not_found="abort") |
| 515 | page_2 = await context_2.new_page() |
| 516 | await page_2.goto(server.PREFIX + "/one-style.html") |
| 517 | assert "hello, world!" in await page_2.content() |
| 518 | await expect(page_2.locator("body")).to_have_css( |
| 519 | "background-color", "rgb(255, 192, 203)" |
| 520 | ) |
| 521 | |
| 522 | |
| 523 | async def test_should_round_trip_har_with_post_data( |
nothing calls this directly
no test coverage detected