Skip to content

Commit 44742f6

Browse files
committed
Skit win gha on geolocation tests, due to a recent change on their side
1 parent 30b82df commit 44742f6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/geolocation/test_geolocation_shared_via_html5.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import sys
2+
from os import environ
3+
14
import pytest
25
from selenium.webdriver import Firefox
36
from selenium.webdriver.common.by import By
@@ -25,6 +28,8 @@ def add_to_prefs_list():
2528

2629
TEST_URL = "https://browserleaks.com/geo"
2730

31+
WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win")
32+
2833

2934
def wait_for_geolocation_data(web_page, timeout=20):
3035
"""Wait until both latitude and longitude data are available."""
@@ -40,6 +45,7 @@ def wait_for_geolocation_data(web_page, timeout=20):
4045
)
4146

4247

48+
@pytest.mark.skipif(WIN_GHA, reason="Recent permission changes at their side")
4349
def test_allow_permission_on_geolocation_via_html5(driver: Firefox):
4450
"""
4551
C15189 - Verify that geolocation is successfully shared when the user allows permission via the HTML5 Geolocation API
@@ -71,6 +77,7 @@ def test_allow_permission_on_geolocation_via_html5(driver: Firefox):
7177
assert permission_icon.is_displayed()
7278

7379

80+
@pytest.mark.skipif(WIN_GHA, reason="Recent permission changes at their side")
7481
def test_block_permission_on_geolocation_via_w3c_api(driver: Firefox):
7582
"""
7683
C15189 - Verify that geolocation is not shared when the user blocks permission via the HTML5 Geolocation API

tests/geolocation/test_geolocation_shared_via_w3c_api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import sys
2+
from os import environ
3+
14
import pytest
25
from selenium.webdriver import Firefox
36

@@ -24,6 +27,8 @@ def add_to_prefs_list():
2427

2528
TEST_URL = "https://www.w3schools.com/html/html5_geolocation.asp"
2629

30+
WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win")
31+
2732

2833
@pytest.fixture()
2934
def temp_selectors():
@@ -46,6 +51,7 @@ def temp_selectors():
4651
}
4752

4853

54+
@pytest.mark.skipif(WIN_GHA, reason="Recent permission changes at their side")
4955
def test_allow_permission_on_geolocation_via_w3c_api(driver: Firefox, temp_selectors):
5056
"""
5157
C15186 - Verify that geolocation is successfully shared when the user allows permission via the W3C Geolocation API
@@ -91,6 +97,7 @@ def test_allow_permission_on_geolocation_via_w3c_api(driver: Firefox, temp_selec
9197
assert permission_icon.is_displayed()
9298

9399

100+
@pytest.mark.skipif(WIN_GHA, reason="Recent permission changes at their side")
94101
def test_block_permission_on_geolocation_via_w3c_api(driver: Firefox, temp_selectors):
95102
"""
96103
C15186 - Verify that geolocation is not shared when the user blocks permission via the W3C Geolocation API

0 commit comments

Comments
 (0)