test: verify release wording and cancelled item resubmission
This commit is contained in:
1 parent
6a716052f4
commit
2e87627ef1
5 files changed
+11
-9
No files matched your search
@@ -68,7 +68,7 @@ def test_aggregate_completed_release_checks_keep_final_proof_visible(release_wor
|
||||
dialog.confirm_button.click()
|
||||
qtbot.waitUntil(lambda: not dialog.busy, timeout=5000)
|
||||
assert len(proofs) == 1, dialog.message.text()
|
||||
assert '已释放 0 个会话' in dialog.message.text()
|
||||
assert '库已释放' in dialog.message.text() and '0 个客户端退出' in dialog.message.text()
|
||||
proof = proofs[0]
|
||||
else:
|
||||
context = operation_queue.BatchTaskContext(str(library))
|
||||
|
||||
@@ -19,8 +19,8 @@ def test_confirmed_scope_and_execution_divergence_are_visible(qtbot, tmp_path, m
|
||||
qtbot.waitUntil(lambda: not dialog.busy)
|
||||
assert dialog.table.columnCount() == 8
|
||||
assert dialog.table.item(0, 6).text() == dialog.table.item(1, 6).text() == '允许'
|
||||
assert dialog.table.item(0, 7).text() == '已释放'
|
||||
assert dialog.table.item(1, 7).text() == '未释放'
|
||||
assert dialog.table.item(0, 7).text() == '客户端已退出'
|
||||
assert dialog.table.item(1, 7).text() == '未退出'
|
||||
assert '原生操作进行中' in dialog.table.item(1, 3).text()
|
||||
assert '确认允许 2' in dialog.message.text() and '未释放 1' in dialog.message.text()
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ owned private desktop/PID, a resolved resource command and an exact PRJ.
|
||||
from pathlib import Path
|
||||
import ast
|
||||
import json
|
||||
import re
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -57,7 +58,7 @@ def test_no_input_injection_or_desktop_switching_in_production_code():
|
||||
# interactive compatibility mode; the default worker remains
|
||||
# isolated and never reaches this branch.
|
||||
continue
|
||||
if api in text:
|
||||
if re.search(r'\b' + re.escape(api) + r'\b', text):
|
||||
offenders.append(f'{path.name}: {api}')
|
||||
assert offenders == [], f'输入注入/桌面切换/菜单驱动 API 不得出现在生产代码: {offenders}'
|
||||
|
||||
|
||||
@@ -362,9 +362,7 @@ def test_prewrite_cancellation_can_resubmit_and_rechecks_ready(qtbot, tmp_path,
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
assert calls == ['Beta']
|
||||
assert window.visible_records()[0].status == ('PENDING' if prewrite else 'UNKNOWN')
|
||||
assert window.batch_button.isEnabled() == prewrite
|
||||
if not prewrite:
|
||||
return
|
||||
assert window.batch_button.isEnabled()
|
||||
|
||||
window.batch_button.click()
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
|
||||
Reference in new issue
Block a user