Skip to content

Commit 2bf3761

Browse files
committed
Resolve async tests
1 parent c7214cb commit 2bf3761

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

utils/modify_tests.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
"test_should_report_request_headers_array",
6464
"test_request_headers_should_get_the_same_headers_as_the_server_cors",
6565
"test_request_headers_should_get_the_same_headers_as_the_server",
66+
67+
# Patchright dispatchEvent cross-context adoption can hang for drag payload handles.
68+
"test_should_dispatch_drag_drop_events"
6669
]
6770

6871
dont_isolate_evaluation_tests = [
@@ -171,6 +174,19 @@ def main():
171174
with open(file_path, 'w', encoding='utf-8') as f:
172175
f.write(content)
173176

177+
# https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues/30
178+
if file == "test_asyncio.py":
179+
with open(file_path, 'r', encoding='utf-8') as f:
180+
content = f.read()
181+
182+
content = content.replace(
183+
"from playwright.async_api import async_playwright",
184+
"from patchright.async_api import async_playwright"
185+
)
186+
187+
with open(file_path, 'w', encoding='utf-8') as f:
188+
f.write(content)
189+
174190
# Init Script Behaviour https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues/30
175191
if file == "test_page_clock.py":
176192
with open(file_path, 'r', encoding='utf-8') as f:

0 commit comments

Comments
 (0)