popup: Write tests on templates