In a test you can disable animations by adding in setUp:
setUp
app.launchEnvironment = ["animations": "0"]
Where app is instance of XCUIApplication.
app