Merge branch 'master' of http://git.zhenyangtang.com.cn/ZYT/zyt
This commit is contained in:
@@ -22,6 +22,7 @@ from PySide6.QtWidgets import (
|
||||
)
|
||||
|
||||
from doctor_workstation.core import PermissionSet
|
||||
from doctor_workstation.ui.design_system import PALETTE
|
||||
from doctor_workstation.ui.diagnosis_drawer import (
|
||||
DiagnosisChoiceButtons,
|
||||
DiagnosisComboBox,
|
||||
@@ -1012,14 +1013,14 @@ def test_choice_chips_keep_visible_checked_style_when_readonly(
|
||||
application.processEvents()
|
||||
# Sample the pad (not glyph center) so white text does not hide the fill.
|
||||
enabled_color = selected.grab().toImage().pixelColor(6, selected.height() // 2)
|
||||
assert enabled_color.name().lower() == "#eef1fa"
|
||||
assert enabled_color.name().lower() == PALETTE["accent_soft"].lower()
|
||||
diet.setReadOnly(True)
|
||||
application.processEvents()
|
||||
disabled_color = selected.grab().toImage().pixelColor(6, selected.height() // 2)
|
||||
assert selected.isChecked()
|
||||
assert selected.isEnabled()
|
||||
assert diet.isReadOnly()
|
||||
assert disabled_color.name().lower() == "#eef1fa"
|
||||
assert disabled_color.name().lower() == PALETTE["accent_soft"].lower()
|
||||
dialog.close()
|
||||
application.processEvents()
|
||||
|
||||
@@ -1039,7 +1040,7 @@ def test_view_only_drawer_shows_selected_choice_chips(
|
||||
selected = next(button for button in diet._buttons if button.isChecked())
|
||||
application.processEvents()
|
||||
color = selected.grab().toImage().pixelColor(6, selected.height() // 2)
|
||||
assert color.name().lower() == "#eef1fa"
|
||||
assert color.name().lower() == PALETTE["accent_soft"].lower()
|
||||
assert diet.isReadOnly()
|
||||
assert not dialog.save_button.isVisibleTo(dialog)
|
||||
dialog.close()
|
||||
|
||||
Reference in New Issue
Block a user