Fix popover js and test