Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#I Remove L10n usage from unit tests #799

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension CallVisualizer.ScreenSharingView {
.padding(.horizontal, 60)
})
.migrationAccessibilityIdentifier("end_screen_sharing_button")
.migrationAccessibilityLabel(L10n.CallVisualizer.ScreenSharing.Accessibility.buttonLabel)
.migrationAccessibilityHint(L10n.CallVisualizer.ScreenSharing.Accessibility.buttonHint)
.migrationAccessibilityLabel(Localization.ScreenSharing.VisitorScreen.End.title)
.migrationAccessibilityHint(Localization.ScreenSharing.VisitorScreen.End.Accessibility.hint)
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import Foundation

extension ChatViewModel: ViewModel {
typealias Strings = L10n.Chat

enum Event {
case viewDidLoad
case messageTextChanged(String)
Expand Down
16 changes: 8 additions & 8 deletions SnapshotTests/VideoCallViewControllerDynamicTypeFontTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ final class VideoCallViewControllerDynamicTypeFontTests: SnapshotTestCase {
videButton: .mock(
inactive: .activeMock(
image: Asset.callVideoActive.image,
title: L10n.Call.Buttons.Video.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Video.Active.label)
title: Localization.Engagement.Video.title,
accessibility: .init(label: Localization.General.selected)
)
),
muteButton: .mock(
inactive: .inactiveMock(
image: Asset.callMuteInactive.image,
title: L10n.Call.Buttons.Mute.Inactive.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Mute.Inactive.label)
title: Localization.Call.Mute.button,
accessibility: .init(label: "")
)
),
speakerButton: .mock(
inactive: .inactiveMock(
image: Asset.callSpeakerInactive.image,
title: L10n.Call.Buttons.Speaker.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Speaker.Inactive.label)
title: Localization.Call.Speaker.button,
accessibility: .init(label: "")
)
),
minimizeButton: .mock(
inactive: .inactiveMock(
image: Asset.callMiminize.image,
title: L10n.Call.Buttons.Minimize.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Minimize.Inactive.label)
title: Localization.Engagement.MinimizeVideo.button,
accessibility: .init(label: "")
)
),
badge: .mock()
Expand Down
16 changes: 8 additions & 8 deletions SnapshotTests/VideoCallViewControllerLayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ final class VideoCallViewControllerLayoutTests: SnapshotTestCase {
videButton: .mock(
inactive: .activeMock(
image: Asset.callVideoActive.image,
title: L10n.Call.Buttons.Video.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Video.Active.label)
title: Localization.Engagement.Video.title,
accessibility: .init(label: Localization.General.selected)
)
),
muteButton: .mock(
inactive: .inactiveMock(
image: Asset.callMuteInactive.image,
title: L10n.Call.Buttons.Mute.Inactive.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Mute.Inactive.label)
title: Localization.Call.Mute.button,
accessibility: .init(label: "")
)
),
speakerButton: .mock(
inactive: .inactiveMock(
image: Asset.callSpeakerInactive.image,
title: L10n.Call.Buttons.Speaker.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Speaker.Inactive.label)
title: Localization.Call.Speaker.button,
accessibility: .init(label: "")
)
),
minimizeButton: .mock(
inactive: .inactiveMock(
image: Asset.callMiminize.image,
title: L10n.Call.Buttons.Minimize.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Minimize.Inactive.label)
title: Localization.Engagement.MinimizeVideo.button,
accessibility: .init(label: "")
)
),
badge: .mock()
Expand Down
16 changes: 8 additions & 8 deletions SnapshotTests/VideoCallViewControllerVoiceOverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ final class VideoCallViewControllerVoiceOverTests: SnapshotTestCase {
videButton: .mock(
inactive: .activeMock(
image: Asset.callVideoActive.image,
title: L10n.Call.Buttons.Video.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Video.Active.label)
title: Localization.Engagement.Video.title,
accessibility: .init(label: Localization.General.selected)
)
),
muteButton: .mock(
inactive: .inactiveMock(
image: Asset.callMuteInactive.image,
title: L10n.Call.Buttons.Mute.Inactive.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Mute.Inactive.label)
title: Localization.Call.Mute.button,
accessibility: .init(label: "")
)
),
speakerButton: .mock(
inactive: .inactiveMock(
image: Asset.callSpeakerInactive.image,
title: L10n.Call.Buttons.Speaker.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Speaker.Inactive.label)
title: Localization.Call.Speaker.button,
accessibility: .init(label: "")
)
),
minimizeButton: .mock(
inactive: .inactiveMock(
image: Asset.callMiminize.image,
title: L10n.Call.Buttons.Minimize.title,
accessibility: .init(label: L10n.Call.Accessibility.Buttons.Minimize.Inactive.label)
title: Localization.Engagement.MinimizeVideo.button,
accessibility: .init(label: "")
)
),
badge: .mock()
Expand Down