Mercurial > libervia-backend
diff tests/e2e/libervia-web/test_libervia-web.py @ 4227:dfccc90cacc6
tests: fix and update tests:
- update code to newer version of `sh`
- update code to newer version of `selenium`
- update names of OMEMO algorithms
- fix paths and names used to mount source to the test container
- skip modules using `Gst` and `PyQt` when they are not available.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 05 Mar 2024 17:31:56 +0100 |
parents | de133b180941 |
children | 4cd4922de876 |
line wrap: on
line diff
--- a/tests/e2e/libervia-web/test_libervia-web.py Tue Mar 05 17:31:56 2024 +0100 +++ b/tests/e2e/libervia-web/test_libervia-web.py Tue Mar 05 17:31:56 2024 +0100 @@ -18,11 +18,27 @@ import os import re + import pytest + from helium import ( - go_to, write, press, click, drag_file, find_all, wait_until, S, Text, Link, Button, - select, scroll_down, get_driver, ENTER + Button, + ENTER, + Link, + S, + Text, + click, + drag_file, + find_all, + get_driver, + go_to, + press, + scroll_down, + select, + wait_until, + write, ) +from selenium.webdriver.common.by import By if os.getenv("LIBERVIA_TEST_ENV_E2E_WEB") is None: @@ -214,8 +230,8 @@ assert Link("manage invitations").exists() item = Link("test item") assert item.exists() - labels_elt = item.web_element.find_element_by_class_name("xmlui_field__labels") - labels = [t.text for t in labels_elt.find_elements_by_tag_name("span")] + labels_elt = item.web_element.find_element(By.CLASS_NAME, "xmlui_field__labels") + labels = [t.text for t in labels_elt.find_elements(By.TAG_NAME, "span")] assert labels == ["label 1", "label 2"] @pytest.mark.dependency(depends=["create_generic_list_item"])