Skip to content

Commit

Permalink
Remove L10n usage from unit tests
Browse files Browse the repository at this point in the history
There were some tests that still used L10n strings, which are now deprecated.

MOB-2747
  • Loading branch information
gersonnoboa committed Oct 13, 2023
1 parent 11d6a09 commit 0b488c3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 28 deletions.
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

0 comments on commit 0b488c3

Please sign in to comment.