fix: update tests for editing_mode and transition_enabled fields
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 1m41s
CI/CD Pipeline / Frontend Lint (push) Successful in 1m42s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 1m42s
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m48s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Successful in 3m2s
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 1m41s
CI/CD Pipeline / Frontend Lint (push) Successful in 1m42s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 1m42s
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m48s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Successful in 3m2s
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Has been skipped
- test_config_schemas: template config now has transition_enabled beyond plan config - test_edit_templates_api: response schema includes editing_mode field
This commit is contained in:
@@ -105,11 +105,19 @@ class TestNormalizePlanConfig:
|
||||
|
||||
|
||||
class TestNormalizeTemplateConfig:
|
||||
def test_same_as_plan_config(self):
|
||||
def test_same_as_plan_config_plus_template_fields(self):
|
||||
"""template config 包含 plan config 的所有字段,外加 transition_enabled"""
|
||||
from packages.domain.config_schemas import normalize_plan_config, normalize_template_config
|
||||
|
||||
raw = {"title": {"text": "模板标题"}}
|
||||
assert normalize_template_config(raw) == normalize_plan_config(raw)
|
||||
plan_cfg = normalize_plan_config(raw)
|
||||
tpl_cfg = normalize_template_config(raw)
|
||||
# plan config 的字段在 template config 中应一致
|
||||
for key in plan_cfg:
|
||||
assert tpl_cfg[key] == plan_cfg[key]
|
||||
# template config 额外包含 transition_enabled
|
||||
assert "transition_enabled" in tpl_cfg
|
||||
assert tpl_cfg["transition_enabled"] is True
|
||||
|
||||
def test_none_returns_defaults(self):
|
||||
from packages.domain.config_schemas import DEFAULT_EDIT_TEMPLATE_CONFIG, normalize_template_config
|
||||
|
||||
@@ -407,6 +407,7 @@ class TestResponseSchema:
|
||||
"name",
|
||||
"description",
|
||||
"template_type",
|
||||
"editing_mode",
|
||||
"config",
|
||||
"preview_url",
|
||||
"sort_weight",
|
||||
|
||||
Reference in New Issue
Block a user