feat: color ai outfit detail statuses
This commit is contained in:
@@ -91,6 +91,25 @@ class TestAiOutfitPanelDefaults(unittest.TestCase):
|
||||
self.assertLessEqual(panel._table.columnWidth(3), 90)
|
||||
self.assertLessEqual(panel._table.columnWidth(5), 130)
|
||||
|
||||
def test_detail_status_column_uses_semantic_colors(self):
|
||||
from core.models import OutfitTask
|
||||
|
||||
panel = self._panel()
|
||||
task = OutfitTask(row_index=2, title="标题", product_id="SKU", garment_path="a.png")
|
||||
panel._populate_table([task])
|
||||
|
||||
expected = {
|
||||
"待处理": "#666666",
|
||||
"生成中": "#0078d4",
|
||||
"完成": "#107c10",
|
||||
"失败": "#c42b1c",
|
||||
"跳过": "#8a8a8a",
|
||||
"停止": "#8a8a8a",
|
||||
}
|
||||
for status, color in expected.items():
|
||||
panel._set_cell(0, 4, status)
|
||||
self.assertEqual(panel._table.item(0, 4).foreground().color().name(), color)
|
||||
|
||||
def test_title_group_present_no_dropdown_preview_removed(self):
|
||||
"""标题生成组存在;无标题模型下拉(配置定名 §17.3);预览块已移除。"""
|
||||
from PySide6.QtWidgets import QLabel
|
||||
|
||||
Reference in New Issue
Block a user