Skip to content

Commit 8559707

Browse files
Hani YacoubHani Yacoub
authored andcommitted
Merge branch 'main' into Hani/cm-clarins-fr
2 parents d14b901 + 4f51862 commit 8559707

File tree

7 files changed

+146
-6
lines changed

7 files changed

+146
-6
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"url": "http://127.0.0.1:8080/fossil_ad.html",
3+
"field_mapping": {
4+
"given_name": "99a70545-7f95-4d53-97f8-bc5bf8fc639b",
5+
"family_name": "b39a17aa-c511-45b0-b2bb-8c6240b27107",
6+
"street_address": "f463c9aa-081b-4266-8ac2-0a2c86374c42",
7+
"address_level_2": "6f9be43b-64cb-4ab7-bc58-ce19bc732b08",
8+
"email": "cbf954aa-ace7-4e4d-aa64-b6bfeb437b97",
9+
"country": "f5270f7d-62dd-4ee0-a4d3-104419e4cd10",
10+
"postal_code": "0ab59bb3-c582-424e-a4cb-c39d0ceb9eab",
11+
"telephone": "afd69703-573b-4eee-b746-4027ac4a2135"
12+
},
13+
14+
"form_field": "*[data-moz-autofill-inspect-id='{given_name}']",
15+
"fields": [
16+
"99a70545-7f95-4d53-97f8-bc5bf8fc639b",
17+
"b39a17aa-c511-45b0-b2bb-8c6240b27107",
18+
"f463c9aa-081b-4266-8ac2-0a2c86374c42",
19+
"6f9be43b-64cb-4ab7-bc58-ce19bc732b08",
20+
"cbf954aa-ace7-4e4d-aa64-b6bfeb437b97",
21+
"f5270f7d-62dd-4ee0-a4d3-104419e4cd10",
22+
"0ab59bb3-c582-424e-a4cb-c39d0ceb9eab",
23+
"afd69703-573b-4eee-b746-4027ac4a2135"
24+
]
25+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"url": "http://127.0.0.1:8080/fossil_cc.html",
3+
"field_mapping": {
4+
"card_number": "79d06c42-b482-4e92-aa96-89e6e5fa50a4",
5+
"expiration_month": "3f05f764-8536-47ed-a80b-40869070f04c",
6+
"expiration_year": "4a2915b3-3f81-4bb7-907b-ec9dba2628a7",
7+
"cvv": "38332785-5fce-4e51-9d6e-b201e22b07aa"
8+
},
9+
10+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
11+
"fields": [
12+
"79d06c42-b482-4e92-aa96-89e6e5fa50a4",
13+
"3f05f764-8536-47ed-a80b-40869070f04c",
14+
"4a2915b3-3f81-4bb7-907b-ec9dba2628a7",
15+
"38332785-5fce-4e51-9d6e-b201e22b07aa"
16+
]
17+
}

l10n_CM/region/FR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"demo",
1010
"ebay",
1111
"fnac",
12+
"fossil",
1213
"leroymerlin",
1314
"vans",
1415
"yellowkorner"

l10n_CM/run_l10n.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"etsy",
5353
"euronics",
5454
"fnac",
55+
"fossil",
5556
"gapcanada",
5657
"giesswein",
5758
"helikon-tex",

l10n_CM/sites/fossil/FR/fossil_ad.html

Lines changed: 40 additions & 0 deletions
Large diffs are not rendered by default.

l10n_CM/sites/fossil/FR/fossil_cc.html

Lines changed: 40 additions & 0 deletions
Large diffs are not rendered by default.

tests/theme_and_toolbar/test_customize_themes_and_redirect.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from platform import system
2-
31
import pytest
42
from selenium.webdriver import Firefox
53

@@ -20,6 +18,20 @@ def test_case():
2018
alpenglow_map = {"light": "rgba(255, 255, 255, 0.76)", "dark": "rgba(40, 29, 78, 0.96)"}
2119

2220

21+
def colors_match(a, b):
22+
"""Determine if two colors are close enough to be considered matches"""
23+
tolerance = 0.14
24+
a_colorstring = a.split("(")[1][:-1]
25+
b_colorstring = b.split("(")[1][:-1]
26+
a_colors = [float(n) for n in a_colorstring.split(",")]
27+
b_colors = [float(n) for n in b_colorstring.split(",")]
28+
for i in range(len(a_colors)):
29+
diff = abs((a_colors[i] / b_colors[i]) - 1.0)
30+
if diff > tolerance:
31+
return False
32+
return True
33+
34+
2335
@pytest.mark.ci
2436
def test_redirect_to_addons(driver: Firefox):
2537
"""
@@ -34,7 +46,6 @@ def test_redirect_to_addons(driver: Firefox):
3446
assert driver.current_url == "about:addons"
3547

3648

37-
@pytest.mark.skipif(system().lower().startswith("win"), reason="Bug 1974109")
3849
@pytest.mark.parametrize("theme_name", list(themes.keys()))
3950
def test_open_addons(driver: Firefox, theme_name: str):
4051
"""
@@ -56,10 +67,12 @@ def test_open_addons(driver: Firefox, theme_name: str):
5667
# Already default on Firefox standard; skip activation/assertion
5768
pytest.skip("Compact Light is default on Firefox, skipping.")
5869

59-
abt_addons.activate_theme(nav, theme_name, themes[theme_name])
70+
current_bg = abt_addons.activate_theme(
71+
nav, theme_name, themes[theme_name], perform_assert=False
72+
)
73+
assert colors_match(current_bg, themes[theme_name])
6074

6175

62-
@pytest.mark.skipif(system().lower().startswith("win"), reason="Bug 1974109")
6376
def test_alpenglow_theme(driver: Firefox):
6477
"""
6578
C118173, specifically for alpenglow theme because color can be two values for dark or light mode
@@ -72,4 +85,7 @@ def test_alpenglow_theme(driver: Firefox):
7285
nav, "firefox-alpenglow_mozilla_org-heading", "", perform_assert=False
7386
)
7487

75-
assert current_bg == alpenglow_map["light"] or current_bg == alpenglow_map["dark"]
88+
# assert current_bg == alpenglow_map["light"] or current_bg == alpenglow_map["dark"]
89+
assert colors_match(current_bg, alpenglow_map["light"]) or colors_match(
90+
current_bg, alpenglow_map["dark"]
91+
)

0 commit comments

Comments
 (0)