Skip to content

Commit 503169e

Browse files
committed
Added missing interception test
1 parent 5ef45fb commit 503169e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/async/test_request_intercept.py

+14
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,17 @@ async def test_should_give_access_to_the_intercepted_response_body(
175175
route.fulfill(response=response),
176176
eval_task,
177177
)
178+
179+
180+
async def test_should_intercept_by_glob(page: Page, server: Server) -> None:
181+
await page.goto(server.EMPTY_PAGE)
182+
await page.route(
183+
"http://localhos**?*oo",
184+
lambda route: route.fulfill(body="intercepted", status=200),
185+
)
186+
187+
result = await page.evaluate(
188+
"url => fetch(url).then(r => r.text())", server.PREFIX + "/?foo"
189+
)
190+
191+
assert result == "intercepted"

0 commit comments

Comments
 (0)