@@ -13,40 +13,19 @@ def test_case():
13
13
14
14
15
15
def test_hover_email_and_phone_autofill_preview (
16
- driver : Firefox ,
17
- region : str ,
18
- about_prefs_privacy : AboutPrefs ,
19
- address_autofill : AddressFill ,
20
- autofill_popup : AutofillPopup ,
21
- util : Utilities ,
16
+ driver : Firefox ,
17
+ region : str ,
18
+ about_prefs_privacy : AboutPrefs ,
19
+ address_autofill : AddressFill ,
20
+ autofill_popup : AutofillPopup ,
21
+ util : Utilities ,
22
22
):
23
- """
24
- Verify that hovering over a saved address entry in the dropdown previews all fields
25
- when interacting with both the Email and Phone fields.
26
-
27
- """
28
- # Open the autofill page and fill it with fake data.
29
23
address_autofill .open ()
30
24
autofill_data = util .fake_autofill_data (region )
31
25
address_autofill .save_information_basic (autofill_data )
32
-
33
- # Click the "Save" button on the autofill popup.
34
26
autofill_popup .click_doorhanger_button ("save" )
35
27
36
- # Click inside the Email field to trigger the autofill dropdown.
37
- address_autofill .double_click ("form-field" , labels = ["email" ])
38
- # Ensure the dropdown is visible.
39
- autofill_popup .ensure_autofill_dropdown_visible ()
40
- # Hover over any saved address entry (without selecting it).
41
- autofill_popup .hover ("select-form-option" )
42
- # Verify that the preview displays all the fields correctly.
43
- address_autofill .verify_autofill_data_on_hover (autofill_data , autofill_popup , util )
44
-
45
- # Click inside the Phone field (using the correct label "tel") to trigger the autofill dropdown.
46
- address_autofill .double_click ("form-field" , labels = ["tel" ])
47
- # Ensure the dropdown is visible.
48
- autofill_popup .ensure_autofill_dropdown_visible ()
49
- # Hover over any saved address entry (without selecting it).
50
- autofill_popup .hover ("select-form-option" )
51
- # Verify that the preview displays all the fields correctly.
52
- address_autofill .verify_autofill_data_on_hover (autofill_data , autofill_popup , util )
28
+ # Check Email field preview.
29
+ address_autofill .check_autofill_preview_for_field ("email" , autofill_data , autofill_popup , util )
30
+ # Check Phone field preview (using the correct label "tel").
31
+ address_autofill .check_autofill_preview_for_field ("tel" , autofill_data , autofill_popup , util )
0 commit comments