From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../tests/test_1817520_ersthelfer_tv.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py (limited to 'testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py') diff --git a/testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py b/testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py new file mode 100644 index 0000000000..e8addbeb68 --- /dev/null +++ b/testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py @@ -0,0 +1,36 @@ +import pytest + +URL = "https://book.ersthelfer.tv/" +DATE = "12.12.2020" +PLACEHOLDER = "__.__.____" + +CITY_CSS = "#city_id" +PERSON_CSS = "#no_of_person" +CITY_OPTION_XPATH = "//select[@name='city_id']/option[2]" +PERSON_OPTION_XPATH = "//select[@name='no_of_person']/option[2]" +DATE_PICKER_CSS = "[class*='date-picker-custom-wrapper'] input" + + +async def set_date(client): + client.await_css(CITY_CSS).click() + client.await_xpath(CITY_OPTION_XPATH).click() + + client.await_css(PERSON_CSS).click() + client.await_xpath(PERSON_OPTION_XPATH).click() + date_input = client.await_css(DATE_PICKER_CSS, is_displayed=True) + date_input.send_keys(DATE) + return date_input.property("value") + + +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + await client.navigate(URL) + assert DATE == await set_date(client) + + +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + await client.navigate(URL) + assert PLACEHOLDER == await set_date(client) -- cgit v1.2.3