Skip to content

Commit 1aab88b

Browse files
committed
Revert, modify
1 parent ed42c36 commit 1aab88b

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

tests/downloads/test_add_mime_type_doc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def test_case():
1515

1616
# Constants
1717
DOC_LINK = "https://sapphire-hendrika-5.tiiny.site/"
18-
WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win")
1918

2019

2120
@pytest.fixture()
@@ -33,7 +32,6 @@ def expected_app_name(sys_platform: str, opt_ci: bool) -> str:
3332
return "LibreOffice Writer"
3433

3534

36-
# @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows Github Actions")
3735
@pytest.mark.noxvfb
3836
def test_mime_type_doc(driver: Firefox, sys_platform: str, opt_ci: bool, delete_files):
3937
"""

tests/downloads/test_add_zip_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_add_zip_type(
6868
about_prefs.open()
6969
about_prefs.get_app_name_for_mime_type("application/zip")
7070

71-
# Remove the directory created as MacOS automatically unzips
71+
# Remove the directory created as macOS automatically unzips
7272
if sys_platform == "Darwin":
7373
dir_created = os.path.join(home_folder, "Downloads", "api-guidelines-vNext")
7474
shutil.rmtree(dir_created)

tests/downloads/test_download_pdf_from_context_menu.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,19 @@ def test_download_pdf_from_context_menu(
3636
must rely on fixed waits to give the OS time to render the dialog and to
3737
finish writing the file.
3838
"""
39+
# Any attempt to refactor this test make the test fail in CI, if time, it can be revised later.
3940

4041
from pynput.keyboard import Controller
4142

4243
# Initialize objects
4344
pdf = GenericPdf(driver, pdf_url=fillable_pdf_url)
44-
keyboard = Controller()
45-
context_menu = ContextMenu(driver)
46-
47-
# Open the PDF file, right-click on the body of the file and select Save page as
4845
pdf.open()
46+
keyboard = Controller()
4947
body = pdf.get_element("pdf-body")
48+
49+
# Right-click on the body of the file and select Save page as
5050
pdf.context_click(body)
51+
context_menu = ContextMenu(driver)
5152
context_menu.click_and_hide_menu("context-menu-save-page-as")
5253

5354
# Allow time for the save dialog to appear and handle prompt
@@ -59,8 +60,7 @@ def test_download_pdf_from_context_menu(
5960
sleep(3)
6061

6162
# Open about:telemetry and go to events tab
62-
about_telemetry = AboutTelemetry(driver)
63-
about_telemetry.open()
63+
about_telemetry = AboutTelemetry(driver).open()
6464
about_telemetry.get_element("events-tab").click()
6565

6666
# Verify that Telemetry is recorded

0 commit comments

Comments
 (0)