Skip to content

Commit e3cdeb9

Browse files
Merge branch 'main' into philimon/l10n_reporting_part_1
2 parents cf2c879 + 31631ab commit e3cdeb9

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

tests/address_bar_and_search/test_search_suggestions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Constants
1111
SEARCH_TERM_SPONSORED = "iphone"
12-
SEARCH_TERM_NON_SPONSORED = "wiki"
12+
SEARCH_TERM_NON_SPONSORED = "wikimedia"
1313
RETRY_LIMIT = 5
1414
SECONDS = 3
1515

@@ -72,5 +72,5 @@ def test_search_suggests_enabled(driver: Firefox):
7272
with driver.context(driver.CONTEXT_CHROME):
7373
nav.get_element("firefox-suggest")
7474
titles = nav.get_elements("suggestion-titles")
75-
found_non_sponsored = any("wikipedia" in title.text for title in titles)
75+
found_non_sponsored = any("Wikipedia" in title.text for title in titles)
7676
assert found_non_sponsored, "Non-sponsored suggestion not found"

tests/preferences/test_clear_cookie_data.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ def test_case():
1010
return "143627"
1111

1212

13+
def open_clear_cookies_data_dialog(about_prefs: AboutPrefs, ba: BrowserActions):
14+
about_prefs.open()
15+
clear_data_popup = about_prefs.press_button_get_popup_dialog_iframe("Clear Data")
16+
ba.switch_to_iframe_context(clear_data_popup)
17+
return about_prefs.get_clear_cookie_data_value()
18+
19+
1320
def test_clear_cookie_data(driver: Firefox):
1421
"""
1522
C143627: Cookies and site data can be cleared via the "Clear Data" panel
@@ -18,27 +25,18 @@ def test_clear_cookie_data(driver: Firefox):
1825
about_prefs = AboutPrefs(driver, category="privacy")
1926
ba = BrowserActions(driver)
2027

21-
def open_clear_cookies_data_dialog():
22-
about_prefs.open()
23-
clear_data_popup = about_prefs.press_button_get_popup_dialog_iframe(
24-
"Clear Data"
25-
)
26-
ba.switch_to_iframe_context(clear_data_popup)
27-
2828
# Visit a site to get a cookie added to saved data
29-
driver.get("https://www.firefox.com")
29+
driver.get("https://www.wikipedia.com")
3030

3131
# Navigate to the clear data dialog of about:preferences#privacy
32-
open_clear_cookies_data_dialog()
33-
3432
# Check for a non-zero value of the 'Cookies and site data' option
35-
cookie_value = about_prefs.get_clear_cookie_data_value()
33+
cookie_value = open_clear_cookies_data_dialog(about_prefs, ba)
3634
assert cookie_value > 0
3735

3836
# Then clear the cookies and site data
3937
about_prefs.get_element("clear-data-accept-button").click()
4038

4139
# Finally, check the value of the dialog option, it should be 0
42-
open_clear_cookies_data_dialog()
43-
cookie_value2 = about_prefs.get_clear_cookie_data_value()
40+
41+
cookie_value2 = open_clear_cookies_data_dialog(about_prefs, ba)
4442
assert cookie_value2 == 0

0 commit comments

Comments
 (0)