(createdMenus, clickListeners, text, info = {}, tab = { id: 7, url: 'https://example.com/' })
| 119 | } |
| 120 | |
| 121 | function clickMenuByText(createdMenus, clickListeners, text, info = {}, tab = { id: 7, url: 'https://example.com/' }) { |
| 122 | const item = getToolMenus(createdMenus).find(menu => menu.title === text); |
| 123 | expect(item, `missing menu item: ${text}`).toBeTruthy(); |
| 124 | clickListeners.forEach(listener => listener({ menuItemId: item.id, ...info }, tab)); |
| 125 | } |
| 126 | |
| 127 | describe('background context menu wiring', () => { |
| 128 | let chromeState; |
no test coverage detected