Skip to content

Commit f7d31be

Browse files
Merge branch 'main' into anca/cm-ebay-at
2 parents b81ca10 + 0777f74 commit f7d31be

File tree

13 files changed

+141
-42
lines changed

13 files changed

+141
-42
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
/.vscode/
22
/venv/
33
.env
44
.report.json

SELECTOR_INFO.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,13 @@ Location: Toolbar - any bookmark context menu
17751775
Path to .json: modules/data/context_menu.components.json
17761776
```
17771777
```
1778+
Selector Name: context-menu-toolbar-open-in-new-tab
1779+
Selector Data: selectorData": "placesContext_open:newtab"
1780+
Description: Context menu option from a Toolbar bookmark
1781+
Location: Toolbar - any bookmark context menu
1782+
Path to .json: modules/data/context_menu.components.json
1783+
```
1784+
```
17781785
Selector Name: context-menu-toolbar-open-all-bookmarks
17791786
Selector Data: placesContext_openBookmarkContainer:tabs
17801787
Description: Open all bookmarks from the context menu option from a Toolbar bookmark
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"url": "http://127.0.0.1:8080/mediamarkt_ad.html",
3+
"field_mapping": {
4+
"given_name": "eb82fd1f-6ebc-4e00-91b0-b33126e3ef51",
5+
"family_name": "5f200911-7e5f-4d9a-9d75-8cc496b455a7",
6+
"street_address": "81b35c70-5949-4b70-afc8-030bdc2d9128",
7+
"email": "ddde9f4b-5d3d-4346-bb45-1df768613507",
8+
"telephone": "721fc82e-817e-4bff-8b5d-e4360eee4724"
9+
10+
},
11+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
12+
"fields": [
13+
"eb82fd1f-6ebc-4e00-91b0-b33126e3ef51",
14+
"5f200911-7e5f-4d9a-9d75-8cc496b455a7",
15+
"81b35c70-5949-4b70-afc8-030bdc2d9128",
16+
"ddde9f4b-5d3d-4346-bb45-1df768613507",
17+
"721fc82e-817e-4bff-8b5d-e4360eee4724"
18+
]
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"url": "http://127.0.0.1:8080/mediamarkt_cc.html",
3+
"field_mapping": {
4+
"card_number": "1d77675c-2591-4e83-b5b5-286b1196d918",
5+
"expiration_date": "811f3be9-b204-469f-aff5-294aa91fb232",
6+
"name": "cdf66cc6-01cb-4f0d-b905-fc4bd37c51e1",
7+
"cvv": "839f304f-4191-4bb7-b3bc-75d9d2314715"
8+
},
9+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
10+
"fields": [
11+
"1d77675c-2591-4e83-b5b5-286b1196d918",
12+
"811f3be9-b204-469f-aff5-294aa91fb232",
13+
"cdf66cc6-01cb-4f0d-b905-fc4bd37c51e1",
14+
"839f304f-4191-4bb7-b3bc-75d9d2314715"
15+
]
16+
}

l10n_CM/region/AT.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"region": "AT",
33
"sites": [
44
"demo",
5-
"ebay"
5+
"ebay",
6+
"mediamarkt"
67
],
78
"tests": [
89
]

l10n_CM/run_l10n.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"bijoubrigitte",
2727
"brico",
2828
"burtsbees",
29-
"burtsbeescalvinklein",
3029
"calvinklein",
3130
"canadatire",
3231
"cdiscount",

l10n_CM/sites/mediamarkt/AT/mediamarkt_ad.html

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

l10n_CM/sites/mediamarkt/AT/mediamarkt_cc.html

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

modules/browser_object_navigation.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,23 @@ def open_bookmark_from_toolbar(self, bookmark_title: str) -> BasePage:
569569
self.panel_ui.click_on("bookmark-by-title", labels=[bookmark_title])
570570
return self
571571

572+
@BasePage.context_chrome
573+
def open_bookmark_in_new_tab_via_context_menu(
574+
self, bookmark_title: str
575+
) -> BasePage:
576+
"""
577+
Right-click bookmark and opens it in a new tab via context menu
578+
579+
Argument:
580+
bookmark_title: The title of the bookmark to open
581+
"""
582+
# Right-click the bookmark and open it in new tabe via context menu item
583+
self.panel_ui.element_clickable("bookmark-by-title", labels=[bookmark_title])
584+
self.panel_ui.context_click("bookmark-by-title", labels=[bookmark_title])
585+
self.context_menu.click_on("context-menu-toolbar-open-in-new-tab")
586+
587+
return self
588+
572589
@BasePage.context_chrome
573590
def open_bookmark_in_new_window_via_context_menu(
574591
self, bookmark_title: str

modules/data/context_menu.components.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@
115115
"groups": []
116116
},
117117

118+
"context-menu-toolbar-open-in-new-tab": {
119+
"selectorData": "placesContext_open:newtab",
120+
"strategy": "id",
121+
"groups": ["doNotCache"]
122+
},
123+
118124
"context-menu-open-link-in-new-window": {
119125
"selectorData": "context-openlink",
120126
"strategy": "id",

0 commit comments

Comments
 (0)