Add callback to menu item in tests