File size: 942 Bytes
4cf7d37 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from pathlib import Path
def test_implementation_mode_dropdown_uses_short_labels_with_dynamic_help():
html = Path("web/index.html").read_text(encoding="utf-8")
app_js = Path("web/static/app.js").read_text(encoding="utf-8")
components_js = Path("web/static/components.js").read_text(encoding="utf-8")
css = Path("web/static/app.css").read_text(encoding="utf-8")
select = html.split('id="implementationMode"', 1)[1].split("</select>", 1)[0]
assert "Strict inference" in select
assert "Best effort inference" in select
assert "Demo scaffold only" in select
assert "Real inference required" not in select
assert 'id="implementationModeHelp"' in html
assert "IMPLEMENTATION_MODE_COPY" in components_js
assert "updateImplementationModeHelp" in app_js
assert "implementationMode')?.addEventListener('change',updateImplementationModeHelp" in app_js
assert ".implementation-mode-help" in css
|