Expand browser editor runtime and LED simulation workflows.
Add Docker deployment support, richer Selenium/LED pattern tests, in-browser diagnostics, responsive UI improvements, and 16x16 panel simulation tooling to speed iteration and hardware-style prototyping. Made-with: Cursor
This commit is contained in:
@@ -7,6 +7,9 @@ import urllib.error
|
||||
import urllib.request
|
||||
|
||||
import pytest
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.support import expected_conditions as ec
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
|
||||
pytest.importorskip("selenium.webdriver")
|
||||
|
||||
@@ -46,3 +49,24 @@ def test_home_page_title(driver):
|
||||
)
|
||||
driver.get(f"{base}/")
|
||||
assert "Python Editor" in driver.title
|
||||
|
||||
|
||||
@pytest.mark.selenium
|
||||
def test_editor_page_loads_core_controls(driver):
|
||||
base = os.environ.get("SELENIUM_BASE_URL", "http://127.0.0.1:8080").rstrip("/")
|
||||
if not _server_reachable(base):
|
||||
pytest.skip(
|
||||
f"No server at {base}. In another terminal run: "
|
||||
"pipenv run dev (then re-run this test, or set SELENIUM_BASE_URL)."
|
||||
)
|
||||
|
||||
driver.get(f"{base}/editor")
|
||||
|
||||
# If the app is configured with AUTH_ENABLED=true, unauthenticated requests redirect to /login.
|
||||
if "/login" in (driver.current_url or ""):
|
||||
pytest.skip("Editor requires login; set AUTH_ENABLED=false for this Selenium smoke test.")
|
||||
|
||||
wait = WebDriverWait(driver, 10)
|
||||
wait.until(ec.presence_of_element_located((By.ID, "run-btn")))
|
||||
wait.until(ec.presence_of_element_located((By.ID, "stop-btn")))
|
||||
wait.until(ec.presence_of_element_located((By.ID, "file-tree")))
|
||||
|
||||
Reference in New Issue
Block a user