@@ -39,18 +39,19 @@ def click_form_button(self, field_name):
39
39
"""Clicks submit on the form"""
40
40
self .click_on ("submit-button" , labels = [field_name ])
41
41
42
- def verify_field_highlights_in_list (
42
+ def verify_field_highlight (
43
43
self ,
44
44
fields_to_test : List [str ],
45
45
expected_highlighted_fields : Optional [List [str ]] = None ,
46
46
extra_fields : Optional [List [str ]] = None ,
47
47
):
48
48
"""
49
- A common method to check which fields have the "yellow highlight."
49
+ A common method to check which fields have the "yellow highlight". This is used in both CC and Address pages.
50
50
- fields_to_test: The primary list of fields for this page (cc fields, address fields).
51
51
- expected_highlighted_fields: Which ones are expected to be highlighted. Defaults to all in `fields_to_test`.
52
52
- extra_fields: If some pages have extra fields to test (e.g. 'cc-csc'), pass them here.
53
53
"""
54
+
54
55
if expected_highlighted_fields is None :
55
56
# By default, everything in fields_to_test is expected to be highlighted
56
57
expected_highlighted_fields = fields_to_test [:]
@@ -388,7 +389,7 @@ def verify_field_yellow_highlights(self, expected_highlighted_fields=None):
388
389
We also want to include the "cc-csc" field in the test, so we
389
390
pass it via 'extra_fields'.
390
391
"""
391
- return self .verify_field_highlights_in_list (
392
+ return self .verify_field_highlight (
392
393
fields_to_test = self .fields ,
393
394
expected_highlighted_fields = expected_highlighted_fields ,
394
395
extra_fields = ["cc-csc" ],
@@ -563,7 +564,7 @@ def verify_field_yellow_highlights(
563
564
if fields_to_test is None :
564
565
fields_to_test = self .fields # By default, test all address fields
565
566
566
- return self .verify_field_highlights_in_list (
567
+ return self .verify_field_highlight (
567
568
fields_to_test = fields_to_test ,
568
569
expected_highlighted_fields = expected_highlighted_fields ,
569
570
)
0 commit comments