Wrote test and moved element type change to below event fire