Repository: airbnb/lottie-ios
File: Tests/SnapshotConfiguration.swift (Swift)

Code before:
    /// Test cases for the `AnimationKeypath` / `AnyValueProvider` system
    "Nonanimating/keypathTest": .customValueProviders([
      AnimationKeypath(keypath: "**.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "**.Fill 1.Color"): ColorValueProvider(.red),
    ]),

    "Switch": .customValueProviders([
      AnimationKeypath(keypath: "Checkmark Outlines.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "Checkmark Outlines 2.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "X Outlines.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "Switch Outline Outlines.Fill 1.Color"): ColorValueProvider([
        Keyframe(value: Color.black, time: 0),
        Keyframe(value: Color(r: 0.76, g: 0.76, b: 0.76, a: 1), time: 75),
        Keyframe(value: Color.black, time: 150),
      ]),
    ]),

    "Issues/issue_1664": .customValueProviders([
      AnimationKeypath(keypath: "**.base_color.**.Color"): ColorValueProvider(.black),
    ]),

    // Test cases for `AnimatedImageProvider`
    "Nonanimating/_dog": .customImageProvider(HardcodedImageProvider(imageName: "Samples/Images/dog.png")),

    // Test cases for `AnimatedTextProvider`
      "": .customTextProvider(HardcodedTextProvider()),

    // Test cases for `AnimationFontProvider`
    "Nonanimating/Text_Glyph": .customFontProvider(HardcodedFontProvider(font: UIFont(name: "Chalkduster", size: 36)!)),

    // Test cases for `RenderingEngineOption.automatic`
    "9squares_AlBoardman": .useAutomaticRenderingEngine, // Supports the Core Animation engine
    "LottieFiles/shop": .useAutomaticRenderingEngine, // Throws a compatibility error in `init`
    "TypeFace/G": .useAutomaticRenderingEngine, // Throws a compatibility error in `display()`
  ]
}

// MARK: Helpers

extension SnapshotConfiguration {
  /// The default configuration to use if no custom mapping is provided
  static let `default` = SnapshotConfiguration()

  static var useAutomaticRenderingEngine: SnapshotConfiguration {
    var configuration = SnapshotConfiguration.default
    configuration.testWithAutomaticEngine = true
    return configuration
  }

  /// The `SnapshotConfiguration` to use for the given sample JSON file name
  static func forSample(named sampleName: String) -> SnapshotConfiguration {

Review comment (suggestion):
This should be:

```suggestion
      "Issues/issue_1722": .customTextProvider(HardcodedTextProvider()),
```

Code after:
    /// Test cases for the `AnimationKeypath` / `AnyValueProvider` system
    "Nonanimating/keypathTest": .customValueProviders([
      AnimationKeypath(keypath: "**.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "**.Fill 1.Color"): ColorValueProvider(.red),
    ]),

    "Switch": .customValueProviders([
      AnimationKeypath(keypath: "Checkmark Outlines.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "Checkmark Outlines 2.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "X Outlines.Group 1.Stroke 1.Color"): ColorValueProvider(.black),
      AnimationKeypath(keypath: "Switch Outline Outlines.Fill 1.Color"): ColorValueProvider([
        Keyframe(value: Color.black, time: 0),
        Keyframe(value: Color(r: 0.76, g: 0.76, b: 0.76, a: 1), time: 75),
        Keyframe(value: Color.black, time: 150),
      ]),
    ]),

    "Issues/issue_1664": .customValueProviders([
      AnimationKeypath(keypath: "**.base_color.**.Color"): ColorValueProvider(.black),
    ]),

    // Test cases for `AnimatedImageProvider`
    "Nonanimating/_dog": .customImageProvider(HardcodedImageProvider(imageName: "Samples/Images/dog.png")),

    // Test cases for `AnimatedTextProvider`
    "Issues/issue_1722": .customTextProvider(HardcodedTextProvider(text: "Bounce-bounce")),

    // Test cases for `AnimationFontProvider`
    "Nonanimating/Text_Glyph": .customFontProvider(HardcodedFontProvider(font: UIFont(name: "Chalkduster", size: 36)!)),

    // Test cases for `RenderingEngineOption.automatic`
    "9squares_AlBoardman": .useAutomaticRenderingEngine, // Supports the Core Animation engine
    "LottieFiles/shop": .useAutomaticRenderingEngine, // Throws a compatibility error in `init`
    "TypeFace/G": .useAutomaticRenderingEngine, // Throws a compatibility error in `display()`
  ]
}

// MARK: Helpers

extension SnapshotConfiguration {
  /// The default configuration to use if no custom mapping is provided
  static let `default` = SnapshotConfiguration()

  static var useAutomaticRenderingEngine: SnapshotConfiguration {
    var configuration = SnapshotConfiguration.default
    configuration.testWithAutomaticEngine = true
    return configuration
  }

  /// The `SnapshotConfiguration` to use for the given sample JSON file name
  static func forSample(named sampleName: String) -> SnapshotConfiguration {