Adding test for waitForAnimation