From 9a15e07f9612c46ff39c9b81edce008122d41551 Mon Sep 17 00:00:00 2001 From: Gerson Noboa Date: Thu, 12 Oct 2023 12:19:40 +0300 Subject: [PATCH] Remove L10n usage from unit tests There were some tests that still used L10n strings, which are now deprecated. MOB-2747 --- .../ScreenSharing/View/ScreenSharingView.swift | 4 ++-- .../ViewModel/Chat/ChatViewModel+ViewModel.swift | 2 -- ...oCallViewControllerDynamicTypeFontTests.swift | 16 ++++++++-------- .../VideoCallViewControllerLayoutTests.swift | 16 ++++++++-------- .../VideoCallViewControllerVoiceOverTests.swift | 16 ++++++++-------- 5 files changed, 26 insertions(+), 28 deletions(-) diff --git a/GliaWidgets/Sources/CallVisualizer/ScreenSharing/View/ScreenSharingView.swift b/GliaWidgets/Sources/CallVisualizer/ScreenSharing/View/ScreenSharingView.swift index 033f18f7c..4aec32547 100644 --- a/GliaWidgets/Sources/CallVisualizer/ScreenSharing/View/ScreenSharingView.swift +++ b/GliaWidgets/Sources/CallVisualizer/ScreenSharing/View/ScreenSharingView.swift @@ -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) } } diff --git a/GliaWidgets/Sources/ViewModel/Chat/ChatViewModel+ViewModel.swift b/GliaWidgets/Sources/ViewModel/Chat/ChatViewModel+ViewModel.swift index 90e7493d8..5af530cab 100644 --- a/GliaWidgets/Sources/ViewModel/Chat/ChatViewModel+ViewModel.swift +++ b/GliaWidgets/Sources/ViewModel/Chat/ChatViewModel+ViewModel.swift @@ -1,8 +1,6 @@ import Foundation extension ChatViewModel: ViewModel { - typealias Strings = L10n.Chat - enum Event { case viewDidLoad case messageTextChanged(String) diff --git a/SnapshotTests/VideoCallViewControllerDynamicTypeFontTests.swift b/SnapshotTests/VideoCallViewControllerDynamicTypeFontTests.swift index cf0b80b3e..2e9f44ecc 100644 --- a/SnapshotTests/VideoCallViewControllerDynamicTypeFontTests.swift +++ b/SnapshotTests/VideoCallViewControllerDynamicTypeFontTests.swift @@ -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() diff --git a/SnapshotTests/VideoCallViewControllerLayoutTests.swift b/SnapshotTests/VideoCallViewControllerLayoutTests.swift index 387ed0249..2efe05f40 100644 --- a/SnapshotTests/VideoCallViewControllerLayoutTests.swift +++ b/SnapshotTests/VideoCallViewControllerLayoutTests.swift @@ -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() diff --git a/SnapshotTests/VideoCallViewControllerVoiceOverTests.swift b/SnapshotTests/VideoCallViewControllerVoiceOverTests.swift index a407f8d4b..df163f8ae 100644 --- a/SnapshotTests/VideoCallViewControllerVoiceOverTests.swift +++ b/SnapshotTests/VideoCallViewControllerVoiceOverTests.swift @@ -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()