We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 026a158 commit 611d2c1Copy full SHA for 611d2c1
tests/sync/test_request_intercept.py
@@ -131,3 +131,17 @@ def handle_route(route: Route) -> None:
131
assert request.uri.decode() == "/title.html"
132
original = (assetdir / "title.html").read_text()
133
assert response.text() == original
134
+
135
136
+def test_should_intercept_by_glob(page: Page, server: Server) -> None:
137
+ page.goto(server.EMPTY_PAGE)
138
+ page.route(
139
+ "http://localhos**?*oo",
140
+ lambda route: route.fulfill(body="intercepted", status=200),
141
+ )
142
143
+ result = page.evaluate(
144
+ "url => fetch(url).then(r => r.text())", server.PREFIX + "/?foo"
145
146
147
+ assert result == "intercepted"
0 commit comments