Sneak Attack says:
When you attack a creature and hit, you can deal extra damage to that target if you have advantage against it or if another enemy of the target is within 5 feet of it and that enemy is able to take actions.
Emphasis mine. Now, suppose I am going to play a High Elf rogue, and select ray of frost as my racial cantrip. Since the ray's damage scales by level (unlike Rogue's standard physical damage progression, which is quite limited), I am thinking about Sneak Attacking with that spell, which nets into 8d6+5d8 plus 10-foot decrement of movement speed in the 20th level, if it's legal. Is this behavior correct? Are spells with attack rolls valid for making sneak attacks, like they were in 3.PF? If they do, does the added Sneak Attack damage assume the same damage type (e. g. cold for ray of frost) as the spell's damage type? Does allowing this give unfair advantage on my hypothetical High Elf rogue over other characters?