This commit is contained in:
Your Name
2026-08-22 08:51:35 +08:00
parent 6c444a4a04
commit c06d293424
69 changed files with 11431 additions and 1601 deletions
+11 -3
View File
@@ -282,12 +282,15 @@ def test_dedicated_model_fixed_columns_selection_and_sort(
assert model.hover_row == 1
second_fixed_cell.hovered_row.emit(-1)
assert model.hover_row == -1
direct_links = {
# 行内只保留“看诊单 / 开方”这两个闭环主操作,其余操作一律降级进“更多”,
# 保证每一行的操作列宽度一致、数据列不再被挤成省略号。
direct_links = [
button.text() for button in action_cell.findChildren(QToolButton) if button.menu() is None
}
assert {"查看", "诊单", "开方", "预约", "补全身份证"} <= direct_links
]
assert direct_links == ["查看", "诊单"]
more = next(button for button in action_cell.findChildren(QToolButton) if button.menu())
menu_texts = [action.text() for action in more.menu().actions() if not action.isSeparator()]
assert menu_texts[:4] == ["开方", "AI 分析", "预约", "补全身份证"]
assert "指派" in menu_texts
assert "取消挂号" in menu_texts
assert {"视频二维码", "二维码", "挂号日志", "创建订单"}.isdisjoint(menu_texts)
@@ -452,7 +455,12 @@ def test_full_more_menu_requires_each_real_repository_capability(
page.table_host.set_rows([record])
cell = page.table_host.fixed.indexWidget(page.table_host.model.index(0, 11))
more = next(button for button in cell.findChildren(QToolButton) if button.menu())
# 前三项是从行内降级下来的次要操作,其后才是本就属于“更多”的能力项。
assert [action.text() for action in more.menu().actions() if not action.isSeparator()] == [
"开方",
"AI 分析",
"预约",
"补全身份证",
"指派",
"取消指派",
"视频二维码",