WIP: Vendoo 1.44.0 – UX Foundation & Guided Workspaces #29
@@ -87,6 +87,7 @@ expect(!/Vendoo(?:ModuleManager|App|Api)\.(?:publish|delete|remove|install|enabl
|
||||
async function verifyRuntime() {
|
||||
const events = [];
|
||||
const commandAdapters = new Map();
|
||||
let commandUnregisters = 0;
|
||||
const documentListeners = new Map();
|
||||
const windowListeners = new Map();
|
||||
const classSet = new Set();
|
||||
@@ -117,7 +118,7 @@ async function verifyRuntime() {
|
||||
VendooCommands: {
|
||||
register(command) {
|
||||
commandAdapters.set(command.id, command);
|
||||
return () => commandAdapters.delete(command.id);
|
||||
return () => { commandUnregisters += 1; commandAdapters.delete(command.id); };
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -154,6 +155,8 @@ async function verifyRuntime() {
|
||||
handler: () => { executed += 1; return true; },
|
||||
});
|
||||
expect(commandAdapters.get('action:test:safe')?.kind === 'action', 'Runtime: Command-Palette-Adapter fehlt');
|
||||
actions.refresh('test:safe');
|
||||
expect(commandUnregisters === 0, 'Runtime: Status-Refresh darf Command-Adapter nicht abmelden und Favoriten verlieren');
|
||||
expect(actions.list({ surface: 'toolbar', context: { scope: 'dashboard', selectionCount: 1 } })[0]?.id === 'test:safe', 'Runtime: Surface-/Kontextfilter liefert falsche Action');
|
||||
expect(actions.resolve('test:safe', { scope: 'dashboard', selectionCount: 0 })?.enabled === false, 'Runtime: Mindestselektion wird nicht erzwungen');
|
||||
expect(actions.resolve('test:safe', { scope: 'settings', selectionCount: 1 })?.visible === false, 'Runtime: Kontextgrenze wird nicht erzwungen');
|
||||
|
||||
Reference in New Issue
Block a user