Commit Graph

53 Commits

Author SHA1 Message Date
Yury Semikhatsky 8eea065aeb
test: enable route.continue cookie tests in firefox (#35320) 2025-03-21 11:35:06 -07:00
Yury Semikhatsky b83e0af11a
fix: do not allow to override cookie header (#35168)
Behavior before this PR regarding 'Cookie' header already varied between browsers:
- Chromium would not respect the 'Cookie' header if there was one with the same name in its cookie jar. If there was no corresponding cooke in the cookie jar, Chromium would apply one from the overrides.
- WebKit would always take one from the cookie jar.

To override cookies `addCookies` should be used instead.


See https://docs.google.com/document/d/1LXMSP4GVxFLYJxA6z4upKqwkgD-TnVCGeX-daS4VQjk/edit?usp=sharing for mode details.

Reference https://github.com/microsoft/playwright/issues/35154
2025-03-20 16:35:03 -07:00
Yury Semikhatsky cd437c972d
fix: do not change glob pattern when converting to url (#34923) 2025-02-28 13:44:25 -08:00
Julian Descottes 4f3a5e2133
chore(bidi): Fix handling of cookie headers in network.continueRequest (#34277) 2025-01-10 11:06:26 -08:00
Dmitry Gozman 5947c21dc7
test: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -07:00
Yury Semikhatsky 3f085d5689
chore: remove same-site expectations for old browsers (#32334) 2024-08-26 18:41:58 -07:00
Max Schmitt 7e1b69cf33
test: update Electron to v30 (#30334) 2024-06-21 00:43:26 +02:00
Viktor Szépe 150cbcbdf3
chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
Andrey Lushnikov 4781b3c3a8
fix(firefox): disable cache when request interception is enabled (#30113)
Fixes #30000
2024-03-28 10:25:37 -07:00
Yury Semikhatsky a1a4133152
chore: extract unroute behavior tests into a separate file (#28674)
Reference https://github.com/microsoft/playwright/issues/23781
2023-12-15 15:37:57 -08:00
Yury Semikhatsky d1e13557fb
test: fulfill/continue/fallback do not throw if page has been closed (#28659)
Reference https://github.com/microsoft/playwright/issues/23781
2023-12-15 09:45:13 -08:00
Yury Semikhatsky d89837c58e
chore: revert noWaitForFinish option, page.close does not wait for ro… (#28658)
…ute handlers

Reference https://github.com/microsoft/playwright/issues/23781
2023-12-15 09:00:12 -08:00
Yury Semikhatsky f28ceffa37
feat: page.unrouteAll and context.unrouteAll (#28635)
Reference https://github.com/microsoft/playwright/issues/23781
2023-12-14 13:48:17 -08:00
Yury Semikhatsky 119afdf788
fix: throw if fuliflled with unsupported status code (#28539)
If request gets cancelled by the page before we fulfill it, we receive
`loadingFailed` event. In that case we'll ignore interception error if
any, otherwise the error will be propagated to the caller.

Fixes https://github.com/microsoft/playwright/issues/28490
2023-12-07 16:57:39 -08:00
Yury Semikhatsky d437e26861
test: sync XHR interception (#28462)
The test now ensures that the request is actually continued.

Reference https://github.com/microsoft/playwright/issues/28461
2023-12-05 09:58:15 -08:00
Yury Semikhatsky 74e51d334e
feat: wait for active route handlers on page/context close (#28414)
Reference https://github.com/microsoft/playwright/issues/23781
2023-12-04 16:19:05 -08:00
Yury Semikhatsky 15a8ba5158
fix(route): correctly remove expired handlers (#28385)
* Check if handler is still in the route list before calling it
* Check if the handler is still in the list before removing it after
`times` expiration
2023-11-28 17:52:16 -08:00
Andrey Lushnikov 615f5afb2b
feat(firefox): roll Firefox to 1420 (#24205)
Fixes https://github.com/microsoft/playwright/issues/22753
2023-07-13 03:54:47 -07:00
Dmitry Gozman 1d0b48f18b
fix(route): handle escapes in the glob pattern (#23932)
Fixes #23303.
2023-06-28 16:33:04 -07:00
Max Schmitt 3c2a8fa306
chore: enable no-floating-promises ESLint rule for tests (#23376)
https://github.com/microsoft/playwright/issues/23339
2023-06-02 21:59:12 +02:00
Dmitry Gozman 1d5add6d99
test: fix `should not fulfill with redirect status` (#23459) 2023-06-01 23:11:03 -07:00
Dmitry Gozman be7984bdc9
fix(unroute): do not compare regexp instances (#23101)
References #23092.
2023-05-17 16:27:32 -07:00
Max Schmitt 77c9641215
test: make Android bots green (#21450) 2023-03-07 17:53:39 +01:00
Dmitry Gozman 2d3e4027e7
fix(chromium): do not pre-populate non-preflight OPTIONS requests (#20684)
Fixes #20469.
2023-02-07 15:10:44 -08:00
Ross Wollman f91e41ef40
test: cannot override cookie header in continue (#16774)
Repro for #16773.
2022-08-23 14:06:25 -07:00
Pavel Feldman ae6f48c4b8
fix(route): match against updated url while chaining (#15112) 2022-06-24 10:48:16 -07:00
Pavel Feldman 225ab68d1c
fix(test): fix the route test (#14890) 2022-06-15 16:15:45 -07:00
Pavel Feldman 9cf068ad06
feat(fallback): allow falling back w/ overrides (#14849) 2022-06-13 17:56:16 -07:00
Pavel Feldman dcdd3c3cdb
feat(route): explicitly fall back to the next handler (#14834) 2022-06-13 12:30:51 -07:00
Dmitry Gozman 7c0bff15ca
feat(fulfill): improve fulfilling from har (#14789)
- `har` option is now an object `{ path, fallback }`.
- Allows falling back to `abort()`, `continue()` or throwing.
- Matches based on url + method.
- Follows redirects in the HAR file.
- Nice error/stack when throwing.
- Tests.
2022-06-10 14:26:45 -07:00
Pavel Feldman 7a568a2952
feat(route): chain routes (#14771) 2022-06-10 09:06:39 -07:00
Andrey Lushnikov e185082a47
tests: mark failing android tests (#14542) 2022-06-02 04:34:05 -07:00
Pavel Feldman a1324bd935
fix(route): support route w/ async handler & times (#14317) 2022-05-21 21:55:46 -07:00
github-actions[bot] 969e6f2ada
feat(webkit): roll to r1637 (#13916) 2022-05-04 16:38:25 -07:00
Pavel Feldman 5ae2017a5b
chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
Yury Semikhatsky 7d7fe3c618
fix(route): remove cors option, compare origin (#13231) 2022-03-31 19:21:21 -07:00
Yury Semikhatsky 5734c18ef8
feat(route): add cors header in route.fulfill (#12943) 2022-03-25 14:56:57 -07:00
Max Schmitt 90e76f9adb
test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
Andrey Lushnikov e8ad7eb3f2
browser(firefox): roll Firefox to M97 (#12574)
Firefox 98 doesn't work on Ubuntu aarch64 yet.

https://github.com/microsoft/playwright/issues/12557
2022-03-07 16:16:42 -08:00
Andrey Lushnikov 66eda836c9
browser(ff-beta): roll Firefox-Beta to 98b10 (#12421)
Firefox reverted the third-party cookies recently:
https://bugzilla.mozilla.org/show_bug.cgi?id=1751435

Thus changes in tests.

References #12225
2022-03-01 00:17:33 -08:00
Yury Semikhatsky d305a2ab3f
fix: throw in route.continue if it is called twice (#11701) 2022-01-27 14:58:02 -08:00
Andrey Lushnikov b6c2b32b53
test: introduce #smoke tests (#11135)
This patch introduces 109 "#smoke" tests - a subset of tests that makes
sure that basic Playwright functionality works. This set is loosely
defined; feel free to add/remove tests to the set. The only goal is to
keep this set minimal & fast to run.

I tried to pick tests so that various parts of Playwright functionality
are exercised.
2021-12-29 18:51:28 -08:00
Pavel Feldman 9b7e02b88b
test: add a couple more route+headers tests (#9322) 2021-10-06 09:35:54 -07:00
Pavel Feldman 6e803f7186
fix(route): allow allHeaders call within route (#9300) 2021-10-04 16:10:16 -07:00
Max Schmitt cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Yury Semikhatsky cc15227327
fix: do not dedup header values (#8998) 2021-09-17 17:19:13 -07:00
Pavel Feldman 0d5b41ce7b
feat(headers): add Headers.headers that would mimic the behavior of the deprecated getters (#8665) 2021-09-02 20:48:23 -07:00
Pavel Feldman 4ed976f2e9
chore: remove isContextDestroyedError heuristic (#8456) 2021-08-26 18:44:49 -07:00
Max Schmitt 8e20f13079
feat(routes): add support for the times option (#8399) 2021-08-24 20:45:50 +02:00
Max Schmitt 767e22c6b2
fix(network): process last inserted routes first in request interception (#7585) 2021-07-13 20:22:01 +02:00