зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1410891 - Fix prompt handle assertions. r=maja_zf
The first assertion was never run because it was passed a tuple of a response value and a boolean. It now compares the response value to the boolean using "is". The second assertion mistakenly used the "==" (equals) operator but should use "is" to get a better pytest error message. MozReview-Commit-ID: HCCr5rExIYu --HG-- extra : rebase_source : b6e087de9ab7041411e363bdbc4f5d1a7b0eb373
This commit is contained in:
Родитель
0cae24dbca
Коммит
88ff8e0fe8
|
@ -103,7 +103,7 @@ def test_handle_prompt_accept(new_session):
|
|||
|
||||
assert_is_active_element(session, response)
|
||||
assert_dialog_handled(session, "accept #2")
|
||||
assert read_global(session, "accept2"), True
|
||||
assert read_global(session, "accept2") is True
|
||||
|
||||
create_dialog(session)("prompt", text="accept #3", result_var="accept3")
|
||||
|
||||
|
@ -142,7 +142,7 @@ def test_handle_prompt_missing_value(session, create_dialog):
|
|||
|
||||
assert_error(response, "unexpected alert open")
|
||||
assert_dialog_handled(session, "dismiss #2")
|
||||
assert session.execute_script("return dismiss2;") == False
|
||||
assert session.execute_script("return dismiss2") is False
|
||||
|
||||
create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче