Added integration tests for the custom panel feature

(still outstanding: implement the "close when removed from DOM" feature)