From f7b0998ab466027daec09b1a729462e488311881 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Mon, 25 Nov 2024 22:18:01 +0600 Subject: [PATCH] fix build --- DuckDuckGo/MainViewController.swift | 6 +++--- DuckDuckGo/TabViewController.swift | 6 +++--- DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift | 6 +++--- .../ContextualOnboardingNewTabDialogFactoryTests.swift | 4 ++-- DuckDuckGoTests/ContextualOnboardingPresenterTests.swift | 4 ++-- DuckDuckGoTests/OnboardingNavigationDelegateTests.swift | 4 ++-- DuckDuckGoTests/TabViewControllerDaxDialogTests.swift | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index 8a51278c6f..e078844e49 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -2821,11 +2821,11 @@ extension MainViewController: OnboardingDelegate { } extension MainViewController: OnboardingNavigationDelegate { - func navigateTo(url: URL) { + func navigateFromOnboarding(to url: URL) { self.loadUrl(url, fromExternalLink: true) } - - func searchFor(_ query: String) { + + func searchFromOnboarding(for query: String) { self.loadQuery(query) } } diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index a5bbd41846..f755becbf9 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -3080,12 +3080,12 @@ extension TabViewController: SaveLoginViewControllerDelegate { } extension TabViewController: OnboardingNavigationDelegate { - - func searchFor(_ query: String) { + + func searchFromOnboarding(for query: String) { delegate?.tab(self, didRequestLoadQuery: query) } - func navigateTo(url: URL) { + func navigateFromOnboarding(to url: URL) { delegate?.tab(self, didRequestLoadURL: url) } diff --git a/DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift b/DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift index f1c406cea8..bcc9373111 100644 --- a/DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift +++ b/DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift @@ -484,12 +484,12 @@ final class ContextualOnboardingDelegateMock: ContextualOnboardingDelegate { func didTapDismissContextualOnboardingAction() { didCallDidTapDismissContextualOnboardingAction = true } - - func searchFor(_ query: String) { + + func searchFromOnboarding(for query: String) { didCallSearchForQuery = true } - func navigateTo(url: URL) { + func navigateFromOnboarding(to url: URL) { didCallNavigateToURL = true urlToNavigateTo = url } diff --git a/DuckDuckGoTests/ContextualOnboardingNewTabDialogFactoryTests.swift b/DuckDuckGoTests/ContextualOnboardingNewTabDialogFactoryTests.swift index 609be206a5..1d08a5c9ef 100644 --- a/DuckDuckGoTests/ContextualOnboardingNewTabDialogFactoryTests.swift +++ b/DuckDuckGoTests/ContextualOnboardingNewTabDialogFactoryTests.swift @@ -294,11 +294,11 @@ class CapturingOnboardingNavigationDelegate: OnboardingNavigationDelegate { var suggestedSearchQuery: String? var urlToNavigateTo: URL? - func searchFor(_ query: String) { + func searchFromOnboarding(for query: String) { suggestedSearchQuery = query } - func navigateTo(url: URL) { + func navigateFromOnboarding(to url: URL) { urlToNavigateTo = url } } diff --git a/DuckDuckGoTests/ContextualOnboardingPresenterTests.swift b/DuckDuckGoTests/ContextualOnboardingPresenterTests.swift index 8575dd6692..5220b6dff9 100644 --- a/DuckDuckGoTests/ContextualOnboardingPresenterTests.swift +++ b/DuckDuckGoTests/ContextualOnboardingPresenterTests.swift @@ -210,12 +210,12 @@ final class TabViewControllerMock: UIViewController, TabViewOnboardingDelegate { didCallDidTapDismissAction = true } - func searchFor(_ query: String) { + func searchFromOnboarding(for query: String) { didCallSearchForQuery = true capturedQuery = query } - func navigateTo(url: URL) { + func navigateFromOnboarding(to url: URL) { didCallNavigateToURL = true capturedURL = url } diff --git a/DuckDuckGoTests/OnboardingNavigationDelegateTests.swift b/DuckDuckGoTests/OnboardingNavigationDelegateTests.swift index 52e2da5b9a..2cc6823ece 100644 --- a/DuckDuckGoTests/OnboardingNavigationDelegateTests.swift +++ b/DuckDuckGoTests/OnboardingNavigationDelegateTests.swift @@ -106,7 +106,7 @@ final class OnboardingNavigationDelegateTests: XCTestCase { let expectedUrl = try XCTUnwrap(URL.makeSearchURL(query: query, queryContext: nil)) // WHEN - mainVC.searchFor(query) + mainVC.searchFromOnboarding(for: query) // THEN assertExpected(queryURL: expectedUrl) @@ -118,7 +118,7 @@ final class OnboardingNavigationDelegateTests: XCTestCase { let expectedUrl = try XCTUnwrap(URL(string: site)) // WHEN - mainVC.navigateTo(url: expectedUrl) + mainVC.navigateFromOnboarding(to: expectedUrl) // THEN assertExpected(url: expectedUrl) diff --git a/DuckDuckGoTests/TabViewControllerDaxDialogTests.swift b/DuckDuckGoTests/TabViewControllerDaxDialogTests.swift index 1e22244892..50fbeac8b9 100644 --- a/DuckDuckGoTests/TabViewControllerDaxDialogTests.swift +++ b/DuckDuckGoTests/TabViewControllerDaxDialogTests.swift @@ -55,7 +55,7 @@ final class TabViewControllerDaxDialogTests: XCTestCase { XCTAssertNil(delegateMock.capturedQuery) // WHEN - sut.searchFor(query) + sut.searchFromOnboarding(for: query) // THEN XCTAssertTrue(delegateMock.didRequestLoadQueryCalled) @@ -68,7 +68,7 @@ final class TabViewControllerDaxDialogTests: XCTestCase { XCTAssertNil(delegateMock.capturedURL) // WHEN - sut.navigateTo(url: .ddg) + sut.navigateFromOnboarding(to: .ddg) // THEN XCTAssertTrue(delegateMock.didRequestLoadURLCalled)