fix: persist native menus and validate every tool workflow
This commit is contained in:
1 parent
7a471fec24
commit
cd88a9950a
76 files changed
+4249
-264
No files matched your search
@@ -95,3 +95,35 @@ def test_settings_controller_stages_update_before_install_request(qtbot, tmp_pat
|
||||
assert result.staged_zip == tmp_path / "updates" / "1.1.0.zip"
|
||||
assert controller._stage_thread is None
|
||||
assert controller.staged_path(manifest) == result.staged_zip
|
||||
|
||||
|
||||
def test_settings_save_preserves_daily_check_timestamp_for_same_source(tmp_path):
|
||||
from dx_productivity.ui.settings_controller import SettingsController
|
||||
controller = SettingsController(settings_path=tmp_path / "settings.json")
|
||||
now = datetime(2026, 10, 10, tzinfo=timezone.utc)
|
||||
controller.save_settings("file:///manifest.json", "development", True)
|
||||
controller.record_check(now=now)
|
||||
|
||||
controller.save_settings(" file:///manifest.json ", "DEVELOPMENT", True)
|
||||
|
||||
assert not controller.auto_check_due(controller.load_settings(), now=now + timedelta(hours=1))
|
||||
controller.save_settings("file:///new-manifest.json", "development", True)
|
||||
assert controller.auto_check_due(controller.load_settings(), now=now + timedelta(hours=1))
|
||||
|
||||
|
||||
def test_real_local_update_check_failure_then_retry_releases_worker(qtbot, tmp_path):
|
||||
from dx_productivity.ui.settings_controller import SettingsController
|
||||
from tests.update.test_service import write_manifest
|
||||
controller = SettingsController(current_version="1.0.0", settings_path=tmp_path / "settings.json")
|
||||
manifest = tmp_path / "manifest.json"
|
||||
manifest.write_text("{broken", encoding="utf-8")
|
||||
|
||||
with qtbot.waitSignal(controller.check_finished, timeout=3000) as failure:
|
||||
controller.check_updates(manifest.as_uri(), "stable")
|
||||
assert failure.args[0].status == "error"
|
||||
assert controller._thread is None
|
||||
write_manifest(manifest, "file:///package.zip")
|
||||
with qtbot.waitSignal(controller.check_finished, timeout=3000) as success:
|
||||
controller.check_updates(manifest.as_uri(), "stable")
|
||||
assert success.args[0].status == "available"
|
||||
assert controller._thread is None
|
||||
Reference in new issue
Block a user