Spaces:
Running on Zero
Running on Zero
File size: 3,353 Bytes
1c7ce9d 4791c0a ffcf6c4 4791c0a ffcf6c4 4791c0a f5031de 1c7ce9d a3e1f0c 18b8de2 151c180 7d1e08d 73bbb0c 1147a5f 151c180 18b8de2 2b5cc0f 7d1e08d 2b5cc0f ffcf6c4 1c7ce9d a3e1f0c 1c7ce9d 18b8de2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | from pathlib import Path
def test_main_interface_copy_is_builder_facing() -> None:
html = Path("static/index.html").read_text(encoding="utf-8")
app_js = Path("static/app.js").read_text(encoding="utf-8")
combined = f"{html}\n{app_js}"
assert "Live project atlas" in html
assert "Refresh map" in html
assert "Open advisor" in html
assert 'id="atlas-search"' in html
assert "Search projects, ideas, quests..." in html
assert 'id="advisor-view"' in html
assert "/api/dashboard" in app_js
assert "/api/dashboard/search" in app_js
assert "/api/dashboard/refresh" in app_js
assert "renderAtlasSvg" in app_js
assert "Directions to test" in html
assert "Closest project echoes" in html
assert "Press Plan to draft build steps for the selected idea." in app_js
assert "Loading an example idea board." in app_js
assert "Example idea board loaded with a plan and share page." in app_js
assert "/api/artifact.png" in app_js
assert "/api/agent-turn" in app_js
assert "/api/transcribe" in app_js
assert "MediaRecorder" in app_js
assert "voiceRecordingState" in app_js
assert "stopVoiceRecording" in app_js
assert 'recording: "Stop"' in app_js
assert 'stopping: "Stopping..."' in app_js
assert "questBadgeHint" in app_js
assert 'title="${escapeAttribute(hint)}"' in app_js
assert "README evidence" in app_js
assert "App file evidence" in app_js
assert "readNdjson" in app_js
assert "@gradio/client" not in app_js
assert "renderArtifactCanvas" not in app_js
assert "canvas.toDataURL" not in app_js
assert 'aria-label="Export build notes"' in html
assert 'aria-label="Export idea-board chapter"' in html
assert 'aria-label="Export current page as PNG"' in html
assert 'aria-label="Voice input"' in html
assert "Voice note" in html
assert "ideaCardAriaLabel" in app_js
assert "Select idea:" in app_js
assert "Hybrid" not in combined
assert "Keyword" not in combined
assert "Semantic" not in combined
assert "Refresh failed:" not in app_js
assert "Refresh could not start: ${error.message}" not in app_js
assert "Refresh status unavailable: ${error.message}" not in app_js
assert "atlasRefreshProgressEl.textContent = error.message" not in app_js
stale_jargon = [
"No wax path pressed.",
"Gold has not gathered.",
"No red ink yet.",
"Demo rehearsal",
"demo rehearsal",
"press a new seal",
"The page is choosing its words.",
"Still riffling the inked pages.",
"YOU VS THE WOOD",
"current Wood",
"advisor turns",
]
for phrase in stale_jargon:
assert phrase not in combined
def test_visible_static_shell_does_not_promote_submission_evidence() -> None:
html = Path("static/index.html").read_text(encoding="utf-8").lower()
promotional_terms = [
"judge",
"prize",
"submission",
"badge",
"build-small",
"hackathon criteria",
]
for term in promotional_terms:
assert term not in html
def test_server_png_copy_uses_interface_language() -> None:
source = Path("hackathon_advisor/png_export.py").read_text(encoding="utf-8")
assert "IDEA MAP" in source
assert "YOU VS THE WOOD" not in source
|