Skip to content

Commit e521771

Browse files
authored
Merge branch 'main' into unflake-test_dialog_event_should_work_with_inline_script_tag
2 parents 9859c3c + 3fea01e commit e521771

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/async/test_defaultbrowsercontext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async def test_context_add_cookies_should_work(
111111
]
112112
)
113113
assert await page.evaluate("() => document.cookie") == "username=John Doe"
114-
assert await page.context.cookies() == [
114+
assert _filter_cookies(await page.context.cookies()) == [
115115
{
116116
"name": "username",
117117
"value": "John Doe",
@@ -127,7 +127,7 @@ async def test_context_add_cookies_should_work(
127127

128128
def _filter_cookies(cookies: Sequence[Cookie]) -> List[Cookie]:
129129
return list(
130-
filter(lambda cookie: cookie["domain"] != "copilot.microsoft.com", cookies)
130+
filter(lambda cookie: not cookie["domain"].endswith("microsoft.com"), cookies)
131131
)
132132

133133

tests/sync/test_browsercontext_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,9 @@ def handle_route(request: TestServerRequest) -> None:
187187

188188
dialog: Dialog = dialog_info.value
189189
popup: Page = popup_info.value
190-
191190
assert dialog.message == "hey?"
192191
assert dialog.page == popup
193192
dialog.accept("hello")
194-
195193
assert popup.evaluate("window.result") == "hello"
196194

197195

0 commit comments

Comments
 (0)