fix broken test add JS to fix bug with edit