Skip to content

Commit 8878d5f

Browse files
authored
Bc/2 batch 2 typos (#107)
* swap escaped double-quote for single-quote in manifests * remove pom for wikimedia image, move stuff to basepage and Generic Page POM * fix up contexts in basepage, more work to be done * fixed up menus, on to stragglers * finish cleanup * fix commit script * bom for devtools * lint and fix profile test * do a barrel roll * fix sync again * lint * Update README.md * Update README.md * fix base page papercuts * gitignore and unstable test * fix intervention card
1 parent 1579d48 commit 8878d5f

File tree

49 files changed

+347
-291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+347
-291
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
results.txt
33
err_log.txt
44
**/report.html
5+
**/result.xml
6+
**/report.xml
57
assets/
68
html_dump/
79
/Test Results - .html

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## fx-desktop-qa-automation
1+
## Project STARfox
2+
**S**moke **T**est **A**utomation **R**epository for Fire*fox* Desktop
3+
24
A Python Selenium based set of tests for smoke testing of Firefox, including Fx incident smoke testing.
35

46
### Build under test

modules/browser_object.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from modules.browser_object_about_prefs_cc_popup import *
22
from modules.browser_object_autofill_popup import *
33
from modules.browser_object_credit_card_popup import *
4+
from modules.browser_object_devtools import *
45
from modules.browser_object_find_toolbar import *
56
from modules.browser_object_image_context_menu import *
67
from modules.browser_object_navigation import *

modules/browser_object_autofill_popup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Union
2+
13
from selenium.webdriver.remote.webelement import WebElement
24
from selenium.webdriver.support import expected_conditions as EC
35

@@ -18,6 +20,14 @@ def press_doorhanger_save(self):
1820
with self.driver.context(self.driver.CONTEXT_CHROME):
1921
self.get_element("doorhanger-save-button").click()
2022

23+
def verify_autofill_displayed(self):
24+
"""Confirms that autofill popup has loaded"""
25+
self.element_clickable("autofill-panel")
26+
27+
def verify_element_displayed(self, reference: Union[str, tuple, WebElement]):
28+
"""Confirms that an element exists in popup"""
29+
self.element_clickable(reference)
30+
2131
def verify_no_popup_panel(self):
2232
"""
2333
Verifies that the autofill popup does NOT appear.
@@ -53,6 +63,26 @@ def get_primary_value(self, element):
5363
ac_value = element.get_attribute("ac-value")
5464
return ac_value
5565

66+
def click_address(self) -> BasePage:
67+
with self.driver.context(self.driver.CONTEXT_CHROME):
68+
self.get_element("select-form-option").click()
69+
return self
70+
71+
def click_clear_address(self) -> BasePage:
72+
with self.driver.context(self.driver.CONTEXT_CHROME):
73+
self.get_element("clear-address").click()
74+
return self
75+
76+
def click_credit_card(self) -> BasePage:
77+
with self.driver.context(self.driver.CONTEXT_CHROME):
78+
self.get_element("select-form-option").click()
79+
return self
80+
81+
def click_clear_credit_card(self) -> BasePage:
82+
with self.driver.context(self.driver.CONTEXT_CHROME):
83+
self.get_element("clear-creditcard").click()
84+
return self
85+
5686
def press_doorhanger_dropdown(self):
5787
"""
5888
Presses the button beside Not now which toggles the dropdown menu in the doorhanger

modules/browser_object_devtools.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from modules.page_base import BasePage
2+
3+
4+
class Devtools(BasePage):
5+
"""BOM for the DevTools panel"""
6+
7+
URL_TEMPLATE = ""
8+
9+
def check_opened(self) -> BasePage:
10+
self.wait_for_page_to_load()
11+
return self

modules/browser_object_panel_ui.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pypom import Region
2+
from selenium.common.exceptions import NoSuchElementException, TimeoutException
23
from selenium.webdriver.support import expected_conditions as EC
34

45
from modules.page_base import BasePage
@@ -106,6 +107,15 @@ def confirm_sync_in_progress(self) -> BasePage:
106107
"""
107108
with self.driver.context(self.driver.CONTEXT_CHROME):
108109
self.click_sync_sign_in_button()
110+
try:
111+
self.instawait.until(
112+
EC.text_to_be_present_in_element(
113+
self.get_selector("fxa-sync-label"), "Sync"
114+
)
115+
)
116+
except (NoSuchElementException, TimeoutException):
117+
self.get_element("panel-ui-button").click()
118+
self.click_sync_sign_in_button()
109119
self.custom_wait(timeout=30, poll_frequency=0.5).until(
110120
EC.text_to_be_present_in_element(
111121
self.get_selector("fxa-sync-label"), "Syncing"

modules/data/about_newtab.components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040

4141
"sponsored-site-card-menu-button": {
42-
"selectorData": "button[class=\"context-menu-button icon\"]",
42+
"selectorData": "button[class='context-menu-button icon']",
4343
"strategy": "css",
4444
"groups": [
4545
"doNotCache"
Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
{
22
"form-field": {
3-
"selectorData": "input[autocomplete=\"{name}\"]",
3+
"selectorData": "input[autocomplete='{name}']",
44
"strategy": "css",
55
"groups": []
66
},
77

88
"submit-button": {
9-
"selectorData": "input[type=\"{name}\"]",
9+
"selectorData": "input[type='{name}']",
1010
"strategy": "css",
1111
"groups": []
12-
},
13-
14-
"clear-address": {
15-
"selectorData": ".autocomplete-richlistbox .autocomplete-richlistitem[ac-value='Clear Autofill Form']",
16-
"strategy":"css",
17-
"groups": []
18-
},
19-
20-
"select-address": {
21-
"selectorData": ".autocomplete-richlistbox .autocomplete-richlistitem",
22-
"strategy":"css",
23-
"groups": []
2412
}
25-
26-
}
13+
}

modules/data/autofill_popup.components.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,26 @@
3131
},
3232

3333
"doorhanger-update-button": {
34-
"selectorData": "button[label=\"Update\"]",
34+
"selectorData": "button[label='Update']",
3535
"strategy": "css",
3636
"groups": []
37+
},
38+
39+
"clear-address": {
40+
"selectorData": ".autocomplete-richlistbox .autocomplete-richlistitem[ac-value='Clear Autofill Form']",
41+
"strategy":"css",
42+
"groups": []
43+
},
44+
45+
"select-form-option": {
46+
"selectorData": ".autocomplete-richlistbox .autocomplete-richlistitem",
47+
"strategy":"css",
48+
"groups": []
49+
},
50+
51+
"clear-creditcard": {
52+
"selectorData": ".autocomplete-richlistbox .autocomplete-richlistitem[ac-value='Clear Autofill Form']",
53+
"strategy":"css",
54+
"groups": []
3755
}
38-
}
56+
}

modules/data/context_menu.components.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"context": "chrome",
3-
"context-menu-search-selected-text": {
2+
"context": "chrome",
3+
"do-not-cache": true,
4+
"context-menu-search-selected-text": {
45
"selectorData": "context-searchselect",
56
"strategy": "id",
67
"groups": []
@@ -23,4 +24,4 @@
2324
"strategy": "id",
2425
"groups": []
2526
}
26-
}
27+
}

0 commit comments

Comments
 (0)