diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index b32b2d08..c824b977 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -1220,6 +1220,23 @@ Ext.define('PVE.Utils', { utilities: { } }, + // test automation helper + call_menu_handler: function(menu, text) { + + var list = menu.query('menuitem'); + + Ext.Array.each(list, function(item) { + if (item.text === text) { + if (item.handler) { + item.handler(); + return 1; + } else { + return undefined; + } + } + }); + }, + createCmdMenu: function(v, record, item, index, event) { event.stopEvent(); if (!(v instanceof Ext.tree.View)) {