mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
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?.();
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user