upgrade: adopt V8.31.1 (theme 1.3/1.4 redesigns, editor deep-canvas, guided launch, component library)
Overlay 190 upstream items (V8.22→8.31) preserving trade-pro theme, registry tests, and design docs. Re-applied full patch set on identical anchors (discovery/env_for/blocks.css/type-mapping/locale-override/ theme_color/frontend entries/test_theme_pro_v3 mods) plus compose pins. Verified: theme suites 35/35; dual-baseline full run 415 passed vs pristine 386+29 ours, FAILED-set diff EMPTY (same 10 Windows env fails). Live: container 8.31.1-dev.1 healthy, hesupipe 192 entries intact, trade-pro build 203 pages 0 errors. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""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')<r.text.index('/ui/workspace.js')
|
||||
assert client.get('/ui/workspace-guide.js').status_code==200
|
||||
|
||||
def test_guide_is_real_navigation_and_real_api(client):
|
||||
js=client.get('/ui/workspace.js').text
|
||||
for phrase in ('function guide()', 'function renderCreateStep()', 'function openCreateWizard()', "await api('/api/sites','POST',data)", "await selectSite(s.id,'guide')"):
|
||||
assert phrase in js
|
||||
assert '正式上线前需要发布条件检查' in client.get('/ui/workspace-guide.js').text
|
||||
create=client.post('/api/sites',json={'name':'引导式新站','theme':'corporate','mode':'new'})
|
||||
assert create.status_code==201
|
||||
data=create.json()
|
||||
entries=client.get(f"/api/sites/{data['id']}/entries").json()
|
||||
assert len(entries)>=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
|
||||
Reference in New Issue
Block a user