Skip to content

Commit

Permalink
update snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mltbnz committed Jan 14, 2025
1 parent 6134296 commit 28539e1
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CriticalMapsKit/Sources/Styleguide/EmptyStateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public struct EmptyStateView: View {

VStack(spacing: .grid(5)) {
Image(uiImage: emptyState.icon)
.renderingMode(.template)
.imageScale(.large)
.foregroundStyle(Color(.textPrimary))
.accessibilityHidden(true)

VStack(spacing: .grid(2)) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import SettingsFeature
import Styleguide
import SwiftUI
import TestHelper
import XCTest

Expand All @@ -15,6 +17,7 @@ final class SettingsViewSnapshotTests: XCTestCase {
)
)
.environment(\.colorScheme, .light)
.accentColor(Color(.textPrimary))

assertScreenSnapshot(settingsView, sloppy: true)
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import Styleguide
import TestHelper
import XCTest

@MainActor
final class EmptyStateViewSnapshotTests: XCTestCase {
func test_emptyStateView_withoutButton_light() {
let view = EmptyStateView(
emptyState: .init(
icon: UIImage(systemName: "bicycle")!,
text: "Critical Maps"
)
)
).environment(\.colorScheme, .light)

assertScreenSnapshot(view)
}
Expand All @@ -35,7 +36,7 @@ final class EmptyStateViewSnapshotTests: XCTestCase {
),
buttonAction: {},
buttonText: "Reload"
)
).environment(\.colorScheme, .light)

assertScreenSnapshot(view)
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ platform :ios do
scan(
project: "CriticalMaps.xcodeproj",
scheme: Scheme,
device: 'iPhone 16',
device: 'iPhone 16 Pro',
result_bundle: true,
xcargs: '-skipPackagePluginValidation -skipMacroValidation'
)
Expand Down

0 comments on commit 28539e1

Please sign in to comment.