8cea7dee20
- SiteForge Enterprise V8.10.0-dev.1 upstream source (210 tests) - Fix: v8_workflows._mapped_input now reads both 类型/分类 columns so WXR imports keep post/product types instead of collapsing to page - Docs: trade-pro theme port spec (R3) and implementation plan Co-Authored-By: Claude Code <noreply@anthropic.com>
19 lines
907 B
Python
19 lines
907 B
Python
from pathlib import Path
|
|
from scripts.install_into_art_design_pro import install
|
|
|
|
|
|
def test_art_route_registration_backup_and_idempotency(tmp_path):
|
|
fake=tmp_path/'official';routes=fake/'src/router/routes/asyncRoutes.ts'
|
|
routes.parent.mkdir(parents=True);routes.write_text('export const asyncRoutes: any[] = []\n')
|
|
(fake/'package.json').write_text('{"name":"art-test"}')
|
|
install(fake,dry_run=True)
|
|
assert routes.read_text()=='export const asyncRoutes: any[] = []\n'
|
|
install(fake,dry_run=False)
|
|
updated=routes.read_text()
|
|
assert updated.count('// SITEFORGE_FACTORY_V8_REGISTERED')==1
|
|
assert 'SiteForgeV8Production' in updated
|
|
assert (fake/'src/views/siteforge/V8Production.vue').is_file()
|
|
install(fake,dry_run=False)
|
|
assert routes.read_text().count('// SITEFORGE_FACTORY_V8_REGISTERED')==1
|
|
assert (routes.parent/'asyncRoutes.ts.siteforge-backup').exists()
|