mirror of
https://github.com/deunix-educ/mediadeck.git
synced 2026-11-25 04:39:42 +01:00
Add make test-ui: Chromium flows against the real isolated server
New tests/test_ui_flows.py drives headless Chromium through the Media tab (folders, breadcrumbs, filters, search, opening a hostile file name), launchers (real launches of a command, a .desktop and a web launcher, live grid updates) and the /admin page (edit, add, reorder, delete, file openers used when opening a file). Any uncaught JavaScript exception fails the test. Four UI mutations were checked to fail their test. The driver now launches Chromium without any D-Bus session (a first attempt let it activate real services on the test bus) and records JavaScript exceptions. wait_for retries while the page is loading, which fixes a race in test_ui_text_button; the older UI tests register their cleanups before setup can fail, so a failed setup no longer leaks a Chromium process. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ PORT ?= 8765
|
||||
HTTP_PORT ?=
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: help deps install config token url qr cert http-on http-off check run dev lint test test-integration uinput uinput-remove \
|
||||
.PHONY: help deps install config token url qr cert http-on http-off check run dev lint test test-integration test-ui uinput uinput-remove \
|
||||
service-install service-uninstall status logs firewall clean distclean
|
||||
|
||||
help: ## Affiche cette aide
|
||||
@@ -84,6 +84,9 @@ test: $(PYTHON) ## Tests unitaires
|
||||
test-integration: $(PYTHON) ## Scénario complet : serveur + bus D-Bus privé + faux lecteur, gio et pactl
|
||||
$(PYTHON) -m unittest discover -s tests -p 'test_integration.py' -v
|
||||
|
||||
test-ui: $(PYTHON) ## Interface dans Chromium (mise en page, onglet Médias, lanceurs, /admin) ; ignoré sans chromium
|
||||
$(PYTHON) -m unittest discover -s tests -p 'test_ui*.py' -v
|
||||
|
||||
uinput: ## Autorise /dev/uinput pour la session active (sudo, règle udev uaccess)
|
||||
sudo install -m 644 udev/60-mediadeck-uinput.rules $(UDEV_RULE)
|
||||
sudo modprobe uinput
|
||||
|
||||
Reference in New Issue
Block a user