fix: align cmhub image timeout display
This commit is contained in:
+19
-1
@@ -809,7 +809,7 @@ class GuiTests(TempDirMixin, unittest.TestCase):
|
||||
tab.image_concurrency_spin.setValue(2)
|
||||
tab.retry_spin.setValue(1)
|
||||
tab.resolution_combo.setCurrentIndex(tab.resolution_combo.findData("2k"))
|
||||
self.assertEqual("360 秒", tab.response_timeout_label.text())
|
||||
self.assertEqual("标题 600 秒 / 图片 650 秒", tab.response_timeout_label.text())
|
||||
tab.jpg_quality_spin.setValue(86)
|
||||
tab.chrome_path_edit.setText("D:\\Chrome\\chrome.exe")
|
||||
tab.default_debug_port_spin.setValue(9300)
|
||||
@@ -866,6 +866,24 @@ class GuiTests(TempDirMixin, unittest.TestCase):
|
||||
|
||||
self.assert_removed(temp_dir)
|
||||
|
||||
def test_settings_tab_direct_timeout_label_uses_resolution_mapping(self):
|
||||
with self.make_temp_dir() as temp_dir:
|
||||
cfg = self.make_config(temp_dir)
|
||||
cfg["ai"] = appconfig.default_config()["ai"]
|
||||
cfg["ai"]["backend"] = "direct"
|
||||
tab = SettingsTab(
|
||||
config=cfg,
|
||||
config_path=cfg["config_path"],
|
||||
ai_models_path=cfg["ai_models_path"],
|
||||
)
|
||||
self.addCleanup(tab.close)
|
||||
|
||||
tab.resolution_combo.setCurrentIndex(tab.resolution_combo.findData("2k"))
|
||||
|
||||
self.assertEqual("360 秒", tab.response_timeout_label.text())
|
||||
|
||||
self.assert_removed(temp_dir)
|
||||
|
||||
def test_settings_save_updates_apply_tab_shared_safety_config(self):
|
||||
with self.make_temp_dir() as temp_dir:
|
||||
cfg = self.make_config(temp_dir)
|
||||
|
||||
Reference in New Issue
Block a user