In a test you can disable animations by adding in setUp:

app.launchEnvironment = ["animations": "0"]

Where app is instance of XCUIApplication.