The Imp is a ranged caster pet, it does not "auto attack" with physical melee hits, ever. For the Imp's firebolt spell, you can right click the icon for "auto cast" and the Imp will spam until out of mana. Once out of mana, the Imp will stand still and do nothing until mana regens. Working as designed/intended.