Add XML export preflight for AI structure
This commit is contained in:
@@ -2365,6 +2365,32 @@ def test_html5_ai_structure_check_path_reports_root_mismatch():
|
||||
assert "доступны только корни" in checked.text
|
||||
|
||||
|
||||
def test_html5_ai_structure_check_path_reports_xml_export_layout(tmp_path: Path):
|
||||
source = tmp_path / "xml-export"
|
||||
(source / "Конфигурация").mkdir(parents=True)
|
||||
(source / "CRM").mkdir(parents=True)
|
||||
(source / "Конфигурация" / "metadata.xml").write_text("<Configuration />", encoding="utf-8")
|
||||
(source / "CRM" / "РасширениеCRM.mdo").write_text("<ConfigurationExtension />", encoding="utf-8")
|
||||
client = TestClient(app)
|
||||
project_id = f"ai-xml-check-{uuid4()}"
|
||||
|
||||
settings = client.post(
|
||||
f"/projects/{project_id}/settings",
|
||||
json={"name": "AI XML Check", "structure_source": "XML_DUMP"},
|
||||
)
|
||||
assert settings.status_code == 200
|
||||
|
||||
checked = client.post(
|
||||
f"/html5/projects/{project_id}/ai-structure/check-path",
|
||||
data={"input_path": str(source)},
|
||||
)
|
||||
assert checked.status_code == 200
|
||||
assert "Сервер видит выгрузку 1С" in checked.text
|
||||
assert "Конфигурация + отдельные папки расширений" in checked.text
|
||||
assert "Главная папка: Конфигурация" in checked.text
|
||||
assert "Папки расширений: CRM" in checked.text
|
||||
|
||||
|
||||
def test_import_full_replace_replaces_current_normalized_project(tmp_path: Path):
|
||||
first = tmp_path / "first"
|
||||
second = tmp_path / "second"
|
||||
|
||||
Reference in New Issue
Block a user