Skip to content

Commit eed6f3d

Browse files
committed
Add test 1756743
1 parent 4650d42 commit eed6f3d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/downloads/test_add_zip_type.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pytest
55
from selenium.webdriver import Firefox
66

7-
from modules.browser_object_context_menu import ContextMenu
87
from modules.browser_object_navigation import Navigation
98
from modules.page_object_generics import GenericPage
109
from modules.page_object_prefs import AboutPrefs
@@ -50,26 +49,24 @@ def test_add_zip_type(
5049
"""
5150
C1756743: Verify that the user can add the .zip mime type to Firefox
5251
"""
53-
# instantiate object
54-
web_page = GenericPage(driver, url=ZIP_URL).open()
52+
# Instantiate objects
53+
web_page = GenericPage(driver, url=ZIP_URL)
5554
nav = Navigation(driver)
56-
context_menu = ContextMenu(driver)
5755
about_prefs = AboutPrefs(driver, category="general")
5856

5957
web_page.elements |= temp_selectors
6058

6159
# Click on the available zip
60+
web_page.open()
6261
web_page.click_on("github-code-button")
6362
web_page.click_on("github-download-button")
6463

6564
# In the download panel right-click on the download and click "Always Open Similar Files"
66-
with driver.context(driver.CONTEXT_CHROME):
67-
nav.context_click(nav.get_element("download-panel-item"))
68-
context_menu.get_element("context-menu-always-open-similar-files").click()
65+
nav.set_always_open_similar_files()
6966

7067
# Open about:preferences and check that zip mime type is present in the application list
7168
about_prefs.open()
72-
about_prefs.element_exists("mime-type-item", labels=["application/zip"])
69+
about_prefs.get_app_name_for_mime_type("application/zip")
7370

7471
# Remove the directory created as MacOS automatically unzips
7572
if sys_platform == "Darwin":

0 commit comments

Comments
 (0)