Skip to content

Commit c2beebc

Browse files
committed
for now
1 parent a2f2572 commit c2beebc

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

modules/data/about_prefs.components.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,17 @@
159159
"groups": []
160160
},
161161

162-
"language-set-alternatives-popup-select-lanuages": {
162+
"language-set-alternatives-popup-select-language": {
163163
"selectorData": "availableLocales",
164164
"strategy": "id",
165-
"groups": []
165+
"groups": [
166+
"doNotCache"
167+
]
166168
},
167169

168-
"language-set-alternatives-popup-select-lanuages-search-more": {
169-
"selectorData": "primaryBrowserLocaleSearch",
170-
"strategy": "id",
170+
"language-set-alternatives-popup-select-language-search-more": {
171+
"selectorData": "menuitem[label=\"Search for more languages…\"]",
172+
"strategy": "css",
171173
"groups": []
172174
},
173175

tests/language_packs/test_language_pack_install_preferences.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from selenium.webdriver import Firefox
44

55
from modules.page_object import AboutPrefs
6-
from modules.util import BrowserActions
6+
from modules.util import BrowserActions, Utilities
77

88

99
def test_language_pack_install_about_preferences(driver: Firefox):
@@ -12,18 +12,32 @@ def test_language_pack_install_about_preferences(driver: Firefox):
1212
"""
1313
about_prefs = AboutPrefs(driver, category="general").open()
1414
ba = BrowserActions(driver)
15+
util = Utilities()
1516
about_prefs.get_element("language-set-alternatives-button").click()
1617

1718
iframe = about_prefs.get_element("browser-popup")
1819
ba.switch_to_iframe_context(iframe)
19-
about_prefs.get_element("language-set-alternatives-popup-select-lanuages").click()
20+
about_prefs.get_element("language-set-alternatives-popup-select-language").click()
21+
2022
about_prefs.element_clickable(
21-
"language-set-alternatives-popup-select-lanuages-search-more"
23+
"language-set-alternatives-popup-select-language-search-more"
24+
)
25+
26+
more_languages_option = about_prefs.get_element(
27+
"language-set-alternatives-popup-select-language-search-more"
2228
)
2329

24-
with driver.context(driver.CONTEXT_CHROME):
25-
select_more = about_prefs.get_element(
26-
"language-set-alternatives-popup-select-lanuages-search-more"
27-
)
28-
select_more.click()
30+
about_prefs.double_click(more_languages_option)
2931
sleep(10)
32+
33+
about_prefs.custom_wait(timeout=20).until(
34+
lambda _: about_prefs.get_element(
35+
"language-set-alternatives-popup-select-language"
36+
).get_attribute("label")
37+
== "Select a language to add…"
38+
)
39+
40+
about_prefs.get_element("language-set-alternatives-popup-select-language").click()
41+
42+
util.write_html_content("contents", driver, False)
43+
util.write_html_content("contentschrome", driver, True)

0 commit comments

Comments
 (0)