Skip to content

Commit b4bf613

Browse files
committed
Merge branch 'main' into as/tls-v1.2-protocol
2 parents 2f13cf6 + 582b6e5 commit b4bf613

File tree

52 files changed

+408
-292
lines changed

Some content is hidden

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

52 files changed

+408
-292
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

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pypom = "*"
1616
jsonpath-ng = "*"
1717
pillow = "*"
1818
pyfxa = "*"
19+
pytest-rerunfailures = "*"
1920

2021
[dev-packages]
2122
werkzeug = "*"

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

ci_pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ markers = [
1616
testpaths = [
1717
"tests"
1818
]
19-
addopts = "-vs --ci -m 'not incident and not unstable' --html=artifacts/report.html"
19+
addopts = "-vs --ci --reruns 2 --reruns-delay 1 -m 'not incident and not unstable' --html=artifacts/report.html"
2020

2121
[tool.ruff]
2222
target-version = "py310"

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+
}

0 commit comments

Comments
 (0)