In Clash of Clans, spells don't effect Hidden Tesla while are hidden. However, in Clash Royale you can see Tesla from the time they are placed. Do spells, such as poison and lightning, deal damage to them while they are underground?
No, hidden teslas will not be damaged while hidden. From the clash-royale wiki - "When it retreats underground when not attacking, the Tesla is unaffected by Spells, such as the Rocket and Lightning. It also cannot be targeted by cards that have a longer range than the Tesla, such as the X-Bow or the Princess, while hiding."