Skip to content

Commit 59b4d6b

Browse files
skip calvinklein
1 parent eb4354c commit 59b4d6b

File tree

6 files changed

+36
-9
lines changed

6 files changed

+36
-9
lines changed

l10n_CM/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The harness relies on several configuration files:
3131
]
3232
}
3333
```
34+
**NOTE**: If both the address and credit card tests are skipped for the site, do not add it to the region files.
35+
3436
- **Site Test Configuration**: Located in `constants/{site_name}.json` or `constants/{site_name}/{region}.json`, defining site-specific test configurations and skipped tests. Here we map the attributes for either `AutofillAddressBase` or `CreditCardBase` to the corresponding selectors.
3537

3638
```aiignore

l10n_CM/region/US.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"walmart",
66
"lowes",
77
"etsy",
8-
"calvinklein",
98
"bestbuy",
109
"demo",
1110
"newegg",

l10n_CM/run_l10n.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"thenorthface",
5555
"zooplus",
5656
"zara",
57-
"cocolita"
57+
"cocolita",
5858
}
5959

6060
loaded_valid_sites = valid_l10n_mappings().keys()

modules/page_base.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
from typing import List, Union
1212

1313
from pynput.keyboard import Controller, Key
14-
from pynput.mouse import Button, Controller as MouseController
14+
from pynput.mouse import Button
15+
from pynput.mouse import Controller as MouseController
1516
from pypom import Page
1617
from selenium.common import NoAlertPresentException
1718
from selenium.common.exceptions import (
@@ -559,7 +560,9 @@ def triple_click(self, reference: Union[str, tuple, WebElement], labels=[]) -> P
559560
"""Actions helper: perform triple-click on a given element"""
560561
return self.multi_click(3, reference, labels)
561562

562-
def control_click(self, reference: Union[str, tuple, WebElement], labels=[]) -> Page:
563+
def control_click(
564+
self, reference: Union[str, tuple, WebElement], labels=[]
565+
) -> Page:
563566
"""Actions helper: perform control-click on given element"""
564567
element = self.fetch(reference, labels)
565568
if self.sys_platform() == "Darwin":
@@ -569,7 +572,7 @@ def control_click(self, reference: Union[str, tuple, WebElement], labels=[]) ->
569572
self.actions.key_down(mod_key).click(element).key_up(mod_key).perform()
570573
return self
571574

572-
def middle_click(self, reference: Union[str, tuple, WebElement], labels =[]):
575+
def middle_click(self, reference: Union[str, tuple, WebElement], labels=[]):
573576
"""Perform a middle mouse click on desired element"""
574577
with self.driver.context(self.driver.CONTEXT_CONTENT):
575578
self.driver.maximize_window()
@@ -584,14 +587,23 @@ def middle_click(self, reference: Union[str, tuple, WebElement], labels =[]):
584587
outer_height = self.driver.execute_script("return window.outerHeight;")
585588
chrome_height = outer_height - inner_height
586589

587-
element_x = window_position['x'] + element_location['x'] + (element_size['width'] / 2)
588-
element_y = window_position['y'] + element_location['y'] + (element_size['height'] / 2) + chrome_height
590+
element_x = (
591+
window_position["x"]
592+
+ element_location["x"]
593+
+ (element_size["width"] / 2)
594+
)
595+
element_y = (
596+
window_position["y"]
597+
+ element_location["y"]
598+
+ (element_size["height"] / 2)
599+
+ chrome_height
600+
)
589601
mouse.position = (element_x, element_y)
590602

591603
time.sleep(1)
592604
mouse.click(Button.middle, 1)
593605
return self
594-
606+
595607
def context_click(
596608
self, reference: Union[str, tuple, WebElement], labels=[]
597609
) -> Page:

modules/testrail_scripts/script.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
if __name__ == "__main__":
2+
import os
3+
4+
from dotenv import load_dotenv
5+
6+
from modules.testrail_integration import reportable
7+
8+
load_dotenv()
9+
os.environ["TESTRAIL_REPORT"] = "True"
10+
os.environ["FX_L10N"] = "True"
11+
os.environ["TESTRAIL_USERNAME"] = "[email protected]"
12+
os.environ["TESTRAIL_API_KEY"] = "1sshvwT1ivoQTO3Ln5KE-TVY6zRc6CS8axCTCAp3P"
13+
check = reportable()
14+
print(check)

tests/tabs/test_open_new_bg_tab_via_mouse_and_keyboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ def test_open_new_bg_tab_via_mouse_and_keyboard(driver: Firefox):
3535
example.wait_for_num_tabs(2)
3636
example.switch_to_new_tab()
3737

38-
assert driver.current_url == test_url
38+
assert driver.current_url == test_url

0 commit comments

Comments
 (0)