"""V8.27 novice-facing console: UI wiring + live API smoke.""" from pathlib import Path from test_factory import client ROOT=Path(__file__).resolve().parents[1] def test_workspace_has_progress_and_safe_guidance(client): r=client.get('/') assert r.status_code==200 for text in ('建站操作指引','createProgressText','createSubmit','选择风格','确认创建','siteModal'): assert text in r.text assert '/ui/workspace-guide.js' in r.text assert r.text.index('/ui/workspace-guide.js')=1 assert any(x['source']=='starter' for x in entries) def test_existing_release_controls_and_permission_barriers_preserved(client): assert client.get('/api/console/bootstrap').status_code==200 ws=client.get('/ui/workspace.js').text for phrase in ('releasePreflight()', 'releaseApproval()', 'releaseDeploy()', 'releaseRollback('): assert phrase in ws assert client.get('/classic').status_code==200