Skip to content

Commit c0228cb

Browse files
added way of skipping ad or cc tests for region site combo
1 parent 017a640 commit c0228cb

File tree

7 files changed

+27
-6
lines changed

7 files changed

+27
-6
lines changed

TEST_EXIT_CODE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

l10n_CM/Unified/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ def cc_form_field(cc_site_data):
157157

158158

159159
@pytest.fixture()
160-
def address_autofill(driver, ad_site_data, ad_form_field, serve_live_site):
160+
def address_autofill(
161+
driver, ad_site_data, ad_form_field, serve_live_site, live_site, region
162+
):
163+
if ad_site_data.get("skip"):
164+
pytest.skip(f"Address tests for {live_site} in {region} region skipped..")
161165
af = AddressFill(
162166
driver,
163167
url_template=ad_site_data.get("url"),
@@ -170,6 +174,8 @@ def address_autofill(driver, ad_site_data, ad_form_field, serve_live_site):
170174

171175
@pytest.fixture()
172176
def credit_card_autofill(driver, cc_site_data, cc_form_field, serve_live_site):
177+
if cc_site_data.get("skip"):
178+
pytest.skip(f"Credit Card tests for {live_site} in {region} region skipped..")
173179
cf = CreditCardFill(
174180
driver,
175181
url_template=cc_site_data.get("url"),
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"url": "http://127.0.0.1:8080/amazon_cc.html",
33
"field_mapping": {
4-
"card_number": "cc-number",
5-
"expiration_date": "cc-exp"
4+
"card_number": "5c01d093-4e7c-422a-99b3-6c7b9a8cd49f",
5+
"expiration_date": "6c5f05c1-72f0-4392-a1ef-a0f7e69ee1b2",
6+
"name": "286af831-a430-43ce-893a-a9e5f21a7417"
67
},
8+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
9+
"skip": "True",
710
"fields": [
8-
"cc-number",
9-
"cc-exp"
11+
"5c01d093-4e7c-422a-99b3-6c7b9a8cd49f",
12+
"6c5f05c1-72f0-4392-a1ef-a0f7e69ee1b2",
13+
"286af831-a430-43ce-893a-a9e5f21a7417"
1014
]
1115
}

l10n_CM/constants/amazon/DE/amazon_cc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"cvv":"b7ea2a60-8b59-4a5a-b1b8-e8d640efd511"
88
},
99
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
10+
"skip": "True",
1011
"fields": [
1112
"06014430-b517-476f-8618-f4770f0c078f",
1213
"31fd4333-af75-4131-939a-d73a36f70fe9",

l10n_CM/constants/amazon/FR/amazon_cc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"cvv":"68a5e85d-d8c5-4d10-9827-394263770656"
88
},
99
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
10+
"skip": "True",
1011
"fields": [
1112
"4bfc1932-75e6-436c-b195-a443beb1adfc",
1213
"b48f8715-36a7-4c89-8c64-5a5471f7d9f2",

selected_l10n_mappings

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
amazon FR CA DE US
2+
mediamarkt DE
3+
demo FR CA DE US
4+
walmart CA US
5+
lowes US
6+
etsy US

tests/audio_video/test_allow_audio_video_functionality.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@ def test_allow_audio_video_functionality(driver: Firefox):
6161
except AssertionError:
6262
sleep(2)
6363
else:
64-
pytest.fail(f"Tab sound status did not reach PLAYING after {max_retries} retries.")
64+
pytest.fail(
65+
f"Tab sound status did not reach PLAYING after {max_retries} retries."
66+
)

0 commit comments

Comments
 (0)