LPS-49945 - Closing Test CAS Configuration window throws js error

https://issues.liferay.com/browse/LPS-49945

Hey @blzaugg, sending you this for review just to make sure I didn't break anything.

Thanks,
Patrick