Skip to content

Commit b258746

Browse files
committed
stabilize tests
1 parent 635c014 commit b258746

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
$env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe"
116116
Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow
117117
pipenv run python choose_ci_set.py
118-
pipenv run pytest -n 4 $(cat selected_tests)
118+
pipenv run pytest -n 4 tests/preferences/test_clear_cookie_data.py tests/language_packs
119119
$env:TEST_EXIT_CODE = $LASTEXITCODE
120120
mv artifacts artifacts-win || true
121121
exit $env:TEST_EXIT_CODE

modules/page_object_prefs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def press_button_get_popup_dialog_iframe(self, button_label: str) -> WebElement:
435435
"""
436436
Returns the iframe object for the dialog panel in the popup after pressing some button that triggers a popup
437437
"""
438-
self.get_element("prefs-button", labels=[button_label]).click()
438+
self.click_on("prefs-button", labels=[button_label])
439439
iframe = self.get_element("browser-popup")
440440
return iframe
441441

@@ -535,6 +535,7 @@ def get_clear_cookie_data_value(self) -> int | None:
535535
The <memory used> value for no cookies is '0 bytes', otherwise values are '### MB', or '### KB'
536536
"""
537537
# Find the dialog option elements containing the checkbox label
538+
self.element_exists("clear-data-dialog-options")
538539
options = self.get_elements("clear-data-dialog-options")
539540

540541
# Extract the text from the label the second option
@@ -628,8 +629,8 @@ def choose_sidebar_option(self, option: str):
628629
"""
629630
Clicks the corresponding sidebar option from the about:addons page.
630631
"""
631-
sleep(1)
632-
self.get_element("sidebar-options", labels=[option]).click()
632+
self.element_exists("sidebar-options", labels=[option])
633+
self.click_on("sidebar-options", labels=[option])
633634

634635
def activate_theme(
635636
self, nav: Navigation, theme_name: str, intended_color: str, perform_assert=True

0 commit comments

Comments
 (0)