plugins: hide the list under the detail overlay

plugins: block activation when the startup check cannot run

ref #3626
This commit is contained in:
bbedward committed 2026-09-29 16:57:24 -04:00
1 parent 53b8de2714
commit 765ffe8564
7 files changed
+125 -95

No files matched your search

+27
View File
@@ -176,6 +176,33 @@ test("updated startup checks still prevent activation on failure", () => {
context.forceRescanPlugin("fixture");
pending.shift()();
assert.equal(context.isPluginLoaded("fixture"), true);
files.set("file:///plugins/fixture/Check.qml", {
check: () => "dependency removed",
destroy() {}
});
context.reloadPlugin("fixture");
assert.equal(context.isPluginLoaded("fixture"), false);
assert.equal(failures.at(-1), "dependency removed");
});
test("startup checks that cannot run prevent activation", () => {
const { context, files, pending, manifest, failures } = service();
const createComponent = context.Qt.createComponent;
context.Qt.createComponent = url => url.startsWith("file:///plugins/fixture/Broken.qml") ? { status: 3, errorString: () => "module missing" } : createComponent(url);
const cases = [
["./Broken.qml", null, "module missing"],
["./Check.qml", { destroy() {} }, "startupCheck has no check function"],
["./Check.qml", { check() { throw new Error("sync throw"); }, destroy() {} }, "sync throw"],
["./Check.qml", { check(done) { throw new Error("async throw"); }, destroy() {} }, "async throw"]
];
for (const [path, probe, error] of cases) {
manifest.startupCheck = path;
files.set("file:///plugins/fixture/Check.qml", probe);
context.forceRescanPlugin("fixture");
pending.shift()();
assert.equal(context.isPluginLoaded("fixture"), false, error);
assert.equal(failures.at(-1), error);
}
});
test("composite updates refresh every surface without creating daemons synchronously", () => {