Keep multi-account refresh responsive and batch monster feeding

This commit is contained in:
AttilaNet
2026-11-08 00:24:21 +08:00
parent 5f0a9eaac3
commit 67b4658e00
23 changed files with 780 additions and 107 deletions
+3
View File
@@ -396,9 +396,11 @@ class AutomationGuiTests(unittest.TestCase):
snapshot.raw["currentTasks"] = [{"id": 88, "typeId": key, "curStep": 1}]
snapshot.monsters[900].update(level=20, potentialLevel=2)
window.render(snapshot, [])
window.refresh_target_choices(snapshot)
window.target.setCurrentIndex(window.target.findData(900))
self.assertIn("上限 20", window.target_status.text())
reward = window.catalog.data["task_info"][key]["reward"]
window.tabs.setCurrentWidget(window.quests_table.parentWidget())
self.assertEqual(int(window.quests_table.item(0, 4).text()), reward["ke"])
self.assertIn("氪金", window.summary.text())
finally:
@@ -415,6 +417,7 @@ class AutomationGuiTests(unittest.TestCase):
window.start_monitor.setChecked(True)
before = len(window.engine.snapshot.raw["monsters"])
def select(mid):
window.tabs.setCurrentWidget(window.monster_page)
row = next(i for i in range(window.monsters.rowCount()) if int(window.monsters.item(i, 0).text()) == mid)
window.monsters.selectRow(row)
select(101)