MCPcopy Index your code
hub / github.com/microsoft/playwright-python / _assert_wheel_event

Function _assert_wheel_event

tests/async/test_input.py:254–265  ·  view source on GitHub ↗
(expected: Any, received: Any, browser_name: str)

Source from the content-addressed store, hash-verified

252
253
254def _assert_wheel_event(expected: Any, received: Any, browser_name: str) -> None:
255 # Chromium reports deltaX/deltaY scaled by host device scale factor.
256 # https://bugs.chromium.org/p/chromium/issues/detail?id=1324819
257 # https://github.com/microsoft/playwright/issues/7362
258 # Different bots have different scale factors (usually 1 or 2), so we just ignore the values
259 # instead of guessing the host scale factor.
260 if sys.platform == "darwin" and browser_name == "chromium":
261 del expected["deltaX"]
262 del expected["deltaY"]
263 del received["deltaX"]
264 del received["deltaY"]
265 assert received == expected
266
267
268async def test_wheel_should_work(page: Page, browser_name: str) -> None:

Callers 1

test_wheel_should_workFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected