This commit is contained in:
Your Name
2026-10-17 16:08:24 +08:00
parent c67b3eff69
commit 56f85f7d89
57 changed files with 4170 additions and 57 deletions
+8 -3
View File
@@ -7,7 +7,7 @@ import pytest
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication, QLabel, QPushButton, QToolButton
from doctor_workstation.core import PermissionSet
from doctor_workstation.core import PermissionSet, UserProfile
from doctor_workstation.core.appointment_modes import (
appointment_type_description,
appointment_type_value,
@@ -76,13 +76,18 @@ def test_appointment_text_chat_carries_exact_ids_and_blocks_video_qr(application
page.deleteLater()
def test_consultation_text_entry_does_not_wait_for_live_video(application, monkeypatch):
@pytest.mark.parametrize("current_user", [
None,
{"id": 66, "role_id": 1},
UserProfile.from_dict({"id": 66, "role_id": [1, 2]}),
])
def test_consultation_text_entry_does_not_wait_for_live_video(application, monkeypatch, current_user):
monkeypatch.setattr(consultations, "run_async", lambda *_a, **_kw: None)
row = {"id": 501, "patient_id": 901, "patient_name": "图文患者", "has_appointment": 1,
"appointment_status": 1, "latest_appointment_id": 71,
"appointments": [{"id": 71, "status": 1, "appointment_type": "text"}],
"video_call_hint": {"state": "none"}}
page = consultations.ConsultationsPage(DemoDoctorRepository(), PermissionSet(["*"]))
page = consultations.ConsultationsPage(DemoDoctorRepository(), PermissionSet(["*"]), current_user=current_user)
try:
page.table_host.set_rows([row])
page.table.selectRow(0)