27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
from PySide6.QtCore import Qt
|
|
|
|
|
|
def test_fourth_navigation_is_independent_and_does_not_open_dsh(ui,qtbot):
|
|
window=ui.window
|
|
window.verification_action.trigger()
|
|
qtbot.waitUntil(lambda:window.content_stack.currentWidget() is window.verification_panel)
|
|
page=window.verification_panel
|
|
assert window.verification_action.isChecked() and not window.dsh_action.isChecked()
|
|
assert window._dsh_view is None and page.new_button.isEnabled()
|
|
task=ui.service.verification.create_task('独立校验',request_id='one')['task_id']
|
|
page.open_task(task)
|
|
qtbot.waitUntil(lambda:page.controller.task_id==task and not page.controller.task_query.busy)
|
|
assert page.new_button.isEnabled()
|
|
assert page.table.rowCount()==0
|
|
assert '来源' not in page.findChild(type(page.title),'verificationTitle').text()
|
|
|
|
|
|
def test_page_keeps_selected_task_when_refreshed(ui,qtbot):
|
|
page=ui.window.verification_panel
|
|
task=ui.service.verification.create_task('任务',request_id='one')['task_id']
|
|
page.open_task(task);page.set_active(True)
|
|
qtbot.waitUntil(lambda:page.tasks.count()==1)
|
|
page.refresh()
|
|
qtbot.waitUntil(lambda:not page.controller.tasks_query.busy)
|
|
assert page.controller.task_id==task
|