diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py')
-rw-r--r-- | testing/webcompat/interventions/tests/test_1817520_ersthelfer_tv.py | 36 |
1 files changed, 36 insertions, 0 deletions
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) |