Skip to content

Commit 110fc35

Browse files
committed
fix merge conflicts
2 parents 7e3782a + b00395c commit 110fc35

23 files changed

+151
-206
lines changed

modules/data/about_newtab.components.json

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"incontent-search-input": {
33
"selectorData": "fake-editable",
44
"strategy": "class",
5-
"groups": [
6-
"requiredForPage"
7-
]
5+
"groups": []
86
},
97

108
"loaded-image": {
@@ -25,20 +23,40 @@
2523
"groups": []
2624
},
2725

28-
"top-sites-list": {
29-
"selectorData": "top-sites-list",
26+
"sponsored-site-card": {
27+
"selectorData": "top-site-outer",
3028
"strategy": "class",
3129
"groups": [
32-
"requiredForPage"
30+
"requiredForPage",
31+
"doNotCache"
3332
]
3433
},
3534

35+
"top-site-image-by-index": {
36+
"selectorData": ".top-sites-list li:nth-of-type({index}) .top-site-icon.rich-icon",
37+
"strategy": "css",
38+
"groups": []
39+
},
40+
41+
"sponsored-site-card-menu-button": {
42+
"selectorData": "button[class=\"context-menu-button icon\"]",
43+
"strategy": "css",
44+
"groups": [
45+
"doNotCache"
46+
]
47+
},
48+
49+
50+
"top-sites-list": {
51+
"selectorData": "top-sites-list",
52+
"strategy": "class",
53+
"groups": []
54+
},
55+
3656
"recommended-by-pocket-list": {
3757
"selectorData": "ds-card-grid-include-descriptions",
3858
"strategy": "class",
39-
"groups": [
40-
"requiredForPage"
41-
]
59+
"groups": []
4260
},
4361

4462
"article-description": {
@@ -58,9 +76,7 @@
5876
"popular-topics-list": {
5977
"selectorData": ".ds-navigation > ul",
6078
"strategy": "css",
61-
"groups": [
62-
"requiredForPage"
63-
]
79+
"groups": []
6480
},
6581

6682
"recent-activity-section": {
@@ -75,6 +91,22 @@
7591
"groups": []
7692
},
7793

94+
"sponsored-site-context-menu": {
95+
"selectorData": "context-menu",
96+
"strategy": "class",
97+
"groups": [
98+
"doNotCache"
99+
]
100+
},
101+
102+
"sponsored-site-context-menu-list": {
103+
"selectorData": "ul[class=\"context-menu-list\"]",
104+
"strategy": "css",
105+
"groups": [
106+
"doNotCache"
107+
]
108+
},
109+
78110
"body-logo": {
79111
"selectorData": "logo",
80112
"strategy": "class",

modules/data/about_prefs.components.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@
135135
"groups": []
136136
},
137137

138+
"show-suggestions": {
139+
"selectorData": "checkbox[data-l10n-id='search-show-suggestions-option']",
140+
"strategy": "css",
141+
"groups": []
142+
},
143+
138144
"firefox-suggest-nonsponsored": {
139145
"selectorData": "firefoxSuggestNonsponsored",
140146
"strategy": "id",

modules/data/navigation.components.json

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@
169169
},
170170

171171
"firefox-suggest": {
172-
"selectorData": "div.urlbarView-row[label=\"Firefox Suggest\"] > span.urlbarView-row-inner",
173-
"strategy": "css",
174-
"groups": []
172+
"selectorData": "div.urlbarView-row[label=\"Firefox Suggest\"] > span.urlbarView-row-inner",
173+
"strategy": "css",
174+
"groups": []
175175
},
176176

177177
"search-result-autofill-adaptive-element": {
@@ -180,33 +180,9 @@
180180
"groups": []
181181
},
182182

183-
"sponsored-site-card": {
184-
"selectorData": "top-site-outer",
185-
"strategy": "class",
186-
"groups": []
187-
},
188-
189-
"sponsored-site-card-menu-button": {
190-
"selectorData": "button[class=\"context-menu-button icon\"]",
191-
"strategy": "css",
192-
"groups": []
193-
},
194-
195-
"sponsored-site-context-menu": {
196-
"selectorData": "context-menu",
197-
"strategy": "class",
198-
"groups": []
199-
},
200-
201-
"sponsored-site-context-menu-list": {
202-
"selectorData": "ul[class=\"context-menu-list\"]",
203-
"strategy": "css",
204-
"groups": []
205-
},
206-
207183
"search-result": {
208-
"selectorData": "//div[@data-text-ad]//a",
209-
"strategy": "xpath",
210-
"groups": []
184+
"selectorData": "//div[@data-text-ad]//a",
185+
"strategy": "xpath",
186+
"groups": []
211187
}
212188
}

tests/address_bar_and_search/conftest.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ def httpserver_listen_address():
1313

1414

1515
@pytest.fixture()
16-
def set_prefs(add_prefs: dict):
16+
def add_prefs():
17+
return []
18+
19+
20+
@pytest.fixture()
21+
def overwrite_prefs():
22+
return []
23+
24+
25+
@pytest.fixture()
26+
def set_prefs(add_prefs: dict, overwrite_prefs):
1727
"""Set prefs"""
1828
prefs = [
1929
("browser.aboutConfig.showWarning", False),
@@ -25,8 +35,13 @@ def set_prefs(add_prefs: dict):
2535
("browser.newtabpage.activity-stream.showSponsoredTopSites", True),
2636
("browser.topsites.useRemoteSetting", True),
2737
("browser.topsites.contile.enabled", True),
38+
("browser.search.region", "US"),
2839
]
2940
prefs.extend(add_prefs)
41+
for overwrite_pref in overwrite_prefs:
42+
match = [pref for pref in prefs if pref[0] == overwrite_pref[0]]
43+
if match:
44+
prefs[prefs.index(match[0])] = overwrite_pref
3045
return prefs
3146

3247

tests/address_bar_and_search/test_adaptive_history_autofill.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
@pytest.fixture()
1111
def add_prefs():
1212
return [
13-
("browser.search.region", "US"),
1413
("browser.urlbar.autoFill.adaptiveHistory.enabled", True),
1514
]
1615

@@ -34,7 +33,7 @@ def test_add_adaptive_history_autofill(driver: Firefox):
3433
driver.switch_to.window(driver.window_handles[1])
3534

3635
with driver.context(driver.CONTEXT_CHROME):
37-
x_icon = tabs.get_element("tab-x-icon", multiple=True)
36+
x_icon = tabs.get_elements("tab-x-icon")
3837
x_icon[0].click()
3938

4039
# Type the first 3 characters of the visited URL in the address bar and select the suggested URL

tests/address_bar_and_search/test_add_engine_address_bar.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
sites = [("YouTube", "com"), ("Ecosia", "org")]
99

1010

11-
# Set search region
12-
@pytest.fixture()
13-
def add_prefs():
14-
return [
15-
("browser.search.region", "US"),
16-
]
17-
18-
1911
@pytest.mark.unstable
2012
@pytest.mark.parametrize("site, domain", sites)
2113
def test_add_search_engine_from_address_bar(driver: Firefox, site: str, domain: str):

tests/address_bar_and_search/test_addon_suggestion.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import time
1+
from time import sleep
22

33
import pytest
44
from selenium.webdriver import Firefox
@@ -7,13 +7,6 @@
77
from modules.browser_object import Navigation
88

99

10-
@pytest.fixture()
11-
def add_prefs():
12-
return [
13-
("browser.search.region", "US"),
14-
]
15-
16-
1710
@pytest.mark.slow
1811
def test_addon_suggestion_based_on_search_input(driver: Firefox):
1912
"""
@@ -37,9 +30,9 @@ def test_addon_suggestion_based_on_search_input(driver: Firefox):
3730
}
3831

3932
nav = Navigation(driver).open()
40-
time.sleep(20)
33+
sleep(20)
4134
nav.set_awesome_bar()
42-
time.sleep(20)
35+
sleep(20)
4336
nav.awesome_bar.click()
4437

4538
for input_text, addon_name in input_to_addon_name.items():

tests/address_bar_and_search/test_default_search_provider_change.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
from time import sleep
22

3-
import pytest
43
from selenium.webdriver import Firefox
54
from selenium.webdriver.common.by import By
65

76
from modules.browser_object import Navigation
87
from modules.page_object import AboutConfig, AboutPrefs
98

109

11-
@pytest.fixture()
12-
def add_prefs():
13-
return [
14-
("browser.search.region", "US"),
15-
]
16-
17-
1810
def test_default_search_provider_change(driver: Firefox):
1911
"""
2012
C1365245 - This test makes sure that the default search

tests/address_bar_and_search/test_glean_basic.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818
PING_ID = ""
1919

2020

21-
# Set search region
22-
@pytest.fixture()
23-
def add_prefs():
24-
return [
25-
("browser.search.region", "US"),
26-
]
27-
28-
2921
def confirm_glean_correctness(
3022
ping_ground: str, ping_test: str, engine_ground: str, engine_test: str
3123
) -> bool:

tests/address_bar_and_search/test_google_search_counts_us.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import time
1+
from time import sleep
22

33
import pytest
44
from selenium.webdriver import Firefox
@@ -8,13 +8,6 @@
88
from modules.util import Utilities
99

1010

11-
@pytest.fixture()
12-
def add_prefs():
13-
return [
14-
("browser.search.region", "US"),
15-
]
16-
17-
1811
# unstable: for some reason cannot pass in Taskcluster Linux VM
1912
@pytest.mark.unstable
2013
def test_google_search_counts_us(driver: Firefox):
@@ -24,7 +17,7 @@ def test_google_search_counts_us(driver: Firefox):
2417
# instantiate objects
2518
nav = Navigation(driver).open()
2619
nav.search("festival")
27-
time.sleep(5)
20+
sleep(5)
2821
about_telemetry = AboutTelemetry(driver).open()
2922
u = Utilities()
3023

0 commit comments

Comments
 (0)