summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/interventions/tests/test_1765947_veniceincoming_com.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/webcompat/interventions/tests/test_1765947_veniceincoming_com.py')
-rw-r--r--testing/webcompat/interventions/tests/test_1765947_veniceincoming_com.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/testing/webcompat/interventions/tests/test_1765947_veniceincoming_com.py b/testing/webcompat/interventions/tests/test_1765947_veniceincoming_com.py
new file mode 100644
index 0000000000..84ad99a3a4
--- /dev/null
+++ b/testing/webcompat/interventions/tests/test_1765947_veniceincoming_com.py
@@ -0,0 +1,42 @@
+import pytest
+from webdriver.error import NoSuchElementException
+
+URL = "https://veniceincoming.com/it_IT/search_results?page=1&start_date_start=&start_date_end=&k="
+COOKIES_CSS = "[aria-label='cookieconsent'] .cc-allow"
+IMG_CSS = ".tour-details"
+TOUR_DATA_CSS = "#tour_data"
+
+
+async def check_filter_opens(client):
+ await client.navigate(URL)
+
+ try:
+ cookies = client.await_css(COOKIES_CSS, is_displayed=True, timeout=5)
+ client.soft_click(cookies)
+ client.await_element_hidden(client.css(COOKIES_CSS))
+ except NoSuchElementException:
+ pass
+
+ img = client.await_css(IMG_CSS)
+ client.scroll_into_view(img)
+ client.mouse.click(element=img).perform()
+
+ try:
+ client.await_css(TOUR_DATA_CSS, is_displayed=True, timeout=5)
+ except NoSuchElementException:
+ return False
+ return True
+
+
+@pytest.mark.only_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ assert await check_filter_opens(client)
+
+
+@pytest.mark.only_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ assert not await check_filter_opens(client)