From 3239008f543068e09cabc89b7eeadede17ae5a67 Mon Sep 17 00:00:00 2001 From: stepanokdev Date: Tue, 7 May 2024 12:59:55 +0300 Subject: [PATCH] feat: changes after code review --- .../Authorization/Presentation/Login/SignInView.swift | 2 +- .../Presentation/Reset Password/ResetPasswordView.swift | 2 +- .../Presentation/NativeDiscovery/CourseDetailsView.swift | 4 ++-- .../Presentation/WebDiscovery/DiscoveryWebview.swift | 2 +- .../Presentation/WebPrograms/ProgramWebviewView.swift | 2 +- .../Presentation/DeleteAccount/DeleteAccountView.swift | 2 +- .../Profile/Presentation/EditProfile/EditProfileView.swift | 2 +- Profile/Profile/Presentation/Profile/ProfileView.swift | 2 +- Profile/Profile/Presentation/Settings/ManageAccountView.swift | 2 +- Profile/Profile/Presentation/Settings/SettingsView.swift | 2 +- Profile/Profile/Presentation/Settings/VideoQualityView.swift | 3 +-- .../Presentation/Settings/SettingsViewModelTests.swift | 1 - 12 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Authorization/Authorization/Presentation/Login/SignInView.swift b/Authorization/Authorization/Presentation/Login/SignInView.swift index 6c044f2a4..20bfcb659 100644 --- a/Authorization/Authorization/Presentation/Login/SignInView.swift +++ b/Authorization/Authorization/Presentation/Login/SignInView.swift @@ -144,7 +144,7 @@ public struct SignInView: View { HStack(alignment: .center) { ProgressBar(size: 40, lineWidth: 8) .padding(20) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") }.frame(maxWidth: .infinity) } else { StyledButton(CoreLocalization.SignIn.logInBtn) { diff --git a/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift b/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift index f2acf63f7..27dedad2f 100644 --- a/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift +++ b/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift @@ -117,7 +117,7 @@ public struct ResetPasswordView: View { HStack(alignment: .center) { ProgressBar(size: 40, lineWidth: 8) .padding(20) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") }.frame(maxWidth: .infinity) } else { StyledButton(AuthLocalization.Forgot.request) { diff --git a/Discovery/Discovery/Presentation/NativeDiscovery/CourseDetailsView.swift b/Discovery/Discovery/Presentation/NativeDiscovery/CourseDetailsView.swift index 427cd4ade..2300433ef 100644 --- a/Discovery/Discovery/Presentation/NativeDiscovery/CourseDetailsView.swift +++ b/Discovery/Discovery/Presentation/NativeDiscovery/CourseDetailsView.swift @@ -47,7 +47,7 @@ public struct CourseDetailsView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 200) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") }.frame(width: proxy.size.width) } else { RefreshableScrollViewCompat(action: { @@ -132,7 +132,7 @@ public struct CourseDetailsView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 20) .frame(maxWidth: .infinity) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } } } diff --git a/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebview.swift b/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebview.swift index 84052bc6d..be01b0be4 100644 --- a/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebview.swift +++ b/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebview.swift @@ -102,7 +102,7 @@ public struct DiscoveryWebview: View { lineWidth: 8 ) .padding(.vertical, proxy.size.height / 2) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } .frame(width: proxy.size.width, height: proxy.size.height) } diff --git a/Discovery/Discovery/Presentation/WebPrograms/ProgramWebviewView.swift b/Discovery/Discovery/Presentation/WebPrograms/ProgramWebviewView.swift index f97dd2c8c..ad28e6938 100644 --- a/Discovery/Discovery/Presentation/WebPrograms/ProgramWebviewView.swift +++ b/Discovery/Discovery/Presentation/WebPrograms/ProgramWebviewView.swift @@ -78,7 +78,7 @@ public struct ProgramWebviewView: View { lineWidth: 8 ) .padding(.vertical, proxy.size.height / 2) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } .frame(width: proxy.size.width, height: proxy.size.height) } diff --git a/Profile/Profile/Presentation/DeleteAccount/DeleteAccountView.swift b/Profile/Profile/Presentation/DeleteAccount/DeleteAccountView.swift index c2f5dc7fb..044e4eb18 100644 --- a/Profile/Profile/Presentation/DeleteAccount/DeleteAccountView.swift +++ b/Profile/Profile/Presentation/DeleteAccount/DeleteAccountView.swift @@ -104,7 +104,7 @@ public struct DeleteAccountView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 20) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } else { StyledButton( ProfileLocalization.DeleteAccount.comfirm, diff --git a/Profile/Profile/Presentation/EditProfile/EditProfileView.swift b/Profile/Profile/Presentation/EditProfile/EditProfileView.swift index 71f50096f..2ec255976 100644 --- a/Profile/Profile/Presentation/EditProfile/EditProfileView.swift +++ b/Profile/Profile/Presentation/EditProfile/EditProfileView.swift @@ -195,7 +195,7 @@ public struct EditProfileView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 150) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } } .navigationBarHidden(false) diff --git a/Profile/Profile/Presentation/Profile/ProfileView.swift b/Profile/Profile/Presentation/Profile/ProfileView.swift index 536993890..b643845bd 100644 --- a/Profile/Profile/Presentation/Profile/ProfileView.swift +++ b/Profile/Profile/Presentation/Profile/ProfileView.swift @@ -118,7 +118,7 @@ public struct ProfileView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 200) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } else { HStack(alignment: .center, spacing: 12) { UserAvatar(url: viewModel.userModel?.avatarUrl ?? "", image: $viewModel.updatedAvatar) diff --git a/Profile/Profile/Presentation/Settings/ManageAccountView.swift b/Profile/Profile/Presentation/Settings/ManageAccountView.swift index e9bc6b4c7..f4a38ab34 100644 --- a/Profile/Profile/Presentation/Settings/ManageAccountView.swift +++ b/Profile/Profile/Presentation/Settings/ManageAccountView.swift @@ -66,7 +66,7 @@ public struct ManageAccountView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 200) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } else { userAvatar editProfileButton diff --git a/Profile/Profile/Presentation/Settings/SettingsView.swift b/Profile/Profile/Presentation/Settings/SettingsView.swift index f25fdbedf..047e238ad 100644 --- a/Profile/Profile/Presentation/Settings/SettingsView.swift +++ b/Profile/Profile/Presentation/Settings/SettingsView.swift @@ -63,7 +63,7 @@ public struct SettingsView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 200) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } else { manageAccount settings diff --git a/Profile/Profile/Presentation/Settings/VideoQualityView.swift b/Profile/Profile/Presentation/Settings/VideoQualityView.swift index 6ab2d951c..a52565c19 100644 --- a/Profile/Profile/Presentation/Settings/VideoQualityView.swift +++ b/Profile/Profile/Presentation/Settings/VideoQualityView.swift @@ -61,9 +61,8 @@ public struct VideoQualityView: View { ProgressBar(size: 40, lineWidth: 8) .padding(.top, 200) .padding(.horizontal) - .accessibilityIdentifier("progressbar") + .accessibilityIdentifier("progress_bar") } else { - ForEach(viewModel.quality, id: \.offset) { _, quality in Button(action: { viewModel.coreAnalytics.videoQualityChanged( diff --git a/Profile/ProfileTests/Presentation/Settings/SettingsViewModelTests.swift b/Profile/ProfileTests/Presentation/Settings/SettingsViewModelTests.swift index f0dcfb894..b9c77c6eb 100644 --- a/Profile/ProfileTests/Presentation/Settings/SettingsViewModelTests.swift +++ b/Profile/ProfileTests/Presentation/Settings/SettingsViewModelTests.swift @@ -40,7 +40,6 @@ final class SettingsViewModelTests: XCTestCase { config: ConfigMock() ) - await viewModel.logOut() Verify(router, .showStartupScreen())