comparison tests/e2e/libervia-web/conftest.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 d78b5eae912a
children 4cd4922de876
comparison
equal deleted inserted replaced
4226:3f7ca590a5da 4227:dfccc90cacc6
24 from datetime import datetime 24 from datetime import datetime
25 from pathlib import Path 25 from pathlib import Path
26 import helium 26 import helium
27 27
28 28
29 WEB_HOST = "libervia-web.test" 29 WEB_HOST = "web"
30 WEB_PORT_HTTPS = 8443 30 WEB_PORT_HTTPS = 8443
31 BASE_URL = f"https://{WEB_HOST}:{WEB_PORT_HTTPS}" 31 BASE_URL = f"https://{WEB_HOST}:{WEB_PORT_HTTPS}"
32 SIZE_DESKTOP = (1024, 728) 32 SIZE_DESKTOP = (1024, 728)
33 SIZE_MOBILE = (380, 640) 33 SIZE_MOBILE = (380, 640)
34 accounts_cookies = {} 34 accounts_cookies = {}
52 dest_dir = report_dir/"screenshots" 52 dest_dir = report_dir/"screenshots"
53 dest_dir.mkdir(parents=True, exist_ok=True) 53 dest_dir.mkdir(parents=True, exist_ok=True)
54 filename = f"{datetime.now().isoformat()}_{request.node.name}.png" 54 filename = f"{datetime.now().isoformat()}_{request.node.name}.png"
55 dest_path = dest_dir/filename 55 dest_path = dest_dir/filename
56 helium.get_driver().save_screenshot(str(dest_path)) 56 helium.get_driver().save_screenshot(str(dest_path))
57 print(f"screenshot saved to {dest_path}") 57 print(f" 📸screenshot saved to {dest_path}")
58 58
59 59
60 def wait_for_socket(host, port, retries=30): 60 def wait_for_socket(host, port, retries=30):
61 sock = socket.socket() 61 sock = socket.socket()
62 while True: 62 while True: