Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from time import sleep

import pytest
from selenium.webdriver import Firefox

Expand All @@ -23,6 +25,7 @@ def test_auto_saved_generated_password_context_menu(driver: Firefox):
"""
C2248176 - Securely Generated Password is auto-saved when generated from password field context menu
"""

# Instantiate objects
context_menu = ContextMenu(driver)
tabs = TabBar(driver)
Expand All @@ -37,14 +40,25 @@ def test_auto_saved_generated_password_context_menu(driver: Firefox):
context_menu.click_and_hide_menu("context-menu-suggest-strong-password")

# Select "Use a Securely Generated Password" in password field and check the "Update password" doorhanger
# is displayed
with driver.context(driver.CONTEXT_CHROME):
login_autofill.get_element("generated-securely-password").click()

# Wait for password field to actually get filled
login_autofill.expect(
lambda _: login_autofill.get_element("password-login-field").get_attribute(
"value"
)
!= ""
)

# Verify the update doorhanger is displayed
with driver.context(driver.CONTEXT_CHROME):
sleep(3)
nav.click_on("password-notification-key")
update_doorhanger = autofill_popup_panel.get_element(
"password-update-doorhanger"
autofill_popup_panel.expect(
lambda _: UPDATE_DOORHANGER_TEXT
in autofill_popup_panel.get_element("password-update-doorhanger").text
)
assert update_doorhanger.text == UPDATE_DOORHANGER_TEXT

# Navigate to about:logins page
tabs.switch_to_new_tab()
Expand Down
Loading