Fix: beforeShow/onClose methods was not being called. New Tests included