Modal Javascript testing