Consider tests for animations (#1779)

This commit is contained in:
Alfonso Grillo
2023-09-21 17:49:38 +02:00
committed by GitHub
parent 37afc8c253
commit bc1910e9bb
8 changed files with 30 additions and 12 deletions
@@ -41,7 +41,10 @@ struct ShimmerModifier: ViewModifier {
private let regularColor = Color.white
/// A slow linear animation which auto-repeats after a delay.
private let animation: Animation = Tests.isRunningUITests ? .noAnimation : .linear(duration: 1.75).delay(0.5).repeatForever(autoreverses: false)
private let animation: Animation = .linear(duration: 1.75)
.delay(0.5)
.repeatForever(autoreverses: false)
.disabledDuringTests()
func body(content: Content) -> some View {
content