I tried to disable animation in UITests with the following code:
let app = XCUIApplication()
app.launchEnvironment = ["DISABLE_ANIMATIONS": "1"]
I also tried:
UIView.setAnimationsEnabled(false)
But it doesn't disable animation when I run UITests on simulator.
Is it because I'm using SwiftUI ?
The animation I want to disable is a view transition from one SwiftUI View to another one. Here is how I coded the transition:
NavigationLink(destination: MapView(), isActive: $viewModel.isDataLoaded) {
EmptyView()
}
Is there another way to disable animation in UITests when using SwiftUI ?