Skip to content

Commit b687cef

Browse files
Hani YacoubHani Yacoub
authored andcommitted
adding fixture and editing conftest
1 parent a9b0dc8 commit b687cef

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/security_and_privacy/conftest.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ def suite_id():
66
return ("X", "Security and Privacy")
77

88

9-
@pytest.fixture()
10-
def add_prefs():
11-
return []
12-
13-
149
@pytest.fixture()
1510
def set_prefs(add_prefs=None):
1611
"""Set prefs"""

tests/security_and_privacy/test_blocking_cryptominers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
from time import sleep
2+
3+
import pytest
24
from selenium.webdriver import Firefox
35
from modules.browser_object_navigation import Navigation
46
from modules.page_object_about_prefs import AboutPrefs
57

6-
cryptominers_url = "https://senglehardt.com/test/trackingprotection/test_pages/fingerprinting_and_cryptomining.html"
8+
CRYPTOMINERS_URL = "https://senglehardt.com/test/trackingprotection/test_pages/fingerprinting_and_cryptomining.html"
79

10+
@pytest.fixture()
11+
def add_prefs():
12+
return []
813

914
def test_blocking_cryptominers(driver: Firefox):
1015
# instantiate objects
@@ -20,7 +25,7 @@ def test_blocking_cryptominers(driver: Firefox):
2025
sleep(2)
2126

2227
# Access url and click on the shield icon and verify that cryptominers are blocked
23-
driver.get(cryptominers_url)
28+
driver.get(CRYPTOMINERS_URL)
2429
with driver.context(driver.CONTEXT_CHROME):
2530
nav.get_element("shield-icon").click()
2631
assert nav.get_element("cryptominers").is_displayed()

0 commit comments

Comments
 (0)