beforeShow/onClose events not being called and tests fix

Fix: beforeShow/onClose methods was not being called. New Tests included.
Removing GTM from Date(), the test fails in some timezones