Fix tray bugs (#5666)

* Make unit tests for tray behave correctly when item is disabled

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make multiple separators in tray originating from same extension not throw up

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen authored and GitHub committed 2022-06-17 16:21:18 +03:00
1 parent 10ba9ef853
commit d0ed4e46b1
3 files changed
+64 -4

No files matched your search

@@ -317,6 +317,10 @@ export const getApplicationBuilder = () => {
throw new Error(`Tried to click tray menu item with ID ${id} which does not exist. Available IDs are: "${availableIds}"`);
}
if (!menuItem.enabled.get()) {
throw new Error(`Tried to click tray menu item with ID ${id} which is disabled.`);
}
await menuItem.click?.();
},
},