diff --git a/novawalletTests/Mocks/ModuleMocks.swift b/novawalletTests/Mocks/ModuleMocks.swift index 30a8b8651..05fd25eb8 100644 --- a/novawalletTests/Mocks/ModuleMocks.swift +++ b/novawalletTests/Mocks/ModuleMocks.swift @@ -4332,9 +4332,9 @@ import Operation_iOS - func didReceiveTabsCount(viewModel: String) { + func didReceiveTabsCount(viewModel: DAppBrowserTabsButtonViewModel) { - return cuckoo_manager.call("didReceiveTabsCount(viewModel: String)", + return cuckoo_manager.call("didReceiveTabsCount(viewModel: DAppBrowserTabsButtonViewModel)", parameters: (viewModel), escapingParameters: (viewModel), superclassCall: @@ -4489,9 +4489,9 @@ import Operation_iOS return .init(stub: cuckoo_manager.createStub(for: MockDAppBrowserViewProtocol.self, method: "didReceive(viewModel: DAppBrowserModel)", parameterMatchers: matchers)) } - func didReceiveTabsCount(viewModel: M1) -> Cuckoo.ProtocolStubNoReturnFunction<(String)> where M1.MatchedType == String { - let matchers: [Cuckoo.ParameterMatcher<(String)>] = [wrap(matchable: viewModel) { $0 }] - return .init(stub: cuckoo_manager.createStub(for: MockDAppBrowserViewProtocol.self, method: "didReceiveTabsCount(viewModel: String)", parameterMatchers: matchers)) + func didReceiveTabsCount(viewModel: M1) -> Cuckoo.ProtocolStubNoReturnFunction<(DAppBrowserTabsButtonViewModel)> where M1.MatchedType == DAppBrowserTabsButtonViewModel { + let matchers: [Cuckoo.ParameterMatcher<(DAppBrowserTabsButtonViewModel)>] = [wrap(matchable: viewModel) { $0 }] + return .init(stub: cuckoo_manager.createStub(for: MockDAppBrowserViewProtocol.self, method: "didReceiveTabsCount(viewModel: DAppBrowserTabsButtonViewModel)", parameterMatchers: matchers)) } func didReceive(response: M1, forTransport name: M2) -> Cuckoo.ProtocolStubNoReturnFunction<(DAppScriptResponse, String)> where M1.MatchedType == DAppScriptResponse, M2.MatchedType == String { @@ -4567,9 +4567,9 @@ import Operation_iOS } @discardableResult - func didReceiveTabsCount(viewModel: M1) -> Cuckoo.__DoNotUse<(String), Void> where M1.MatchedType == String { - let matchers: [Cuckoo.ParameterMatcher<(String)>] = [wrap(matchable: viewModel) { $0 }] - return cuckoo_manager.verify("didReceiveTabsCount(viewModel: String)", callMatcher: callMatcher, parameterMatchers: matchers, sourceLocation: sourceLocation) + func didReceiveTabsCount(viewModel: M1) -> Cuckoo.__DoNotUse<(DAppBrowserTabsButtonViewModel), Void> where M1.MatchedType == DAppBrowserTabsButtonViewModel { + let matchers: [Cuckoo.ParameterMatcher<(DAppBrowserTabsButtonViewModel)>] = [wrap(matchable: viewModel) { $0 }] + return cuckoo_manager.verify("didReceiveTabsCount(viewModel: DAppBrowserTabsButtonViewModel)", callMatcher: callMatcher, parameterMatchers: matchers, sourceLocation: sourceLocation) } @discardableResult @@ -4655,7 +4655,7 @@ import Operation_iOS - func didReceiveTabsCount(viewModel: String) { + func didReceiveTabsCount(viewModel: DAppBrowserTabsButtonViewModel) { return DefaultValueRegistry.defaultValue(for: (Void).self) } diff --git a/novawalletTests/Modules/DApps/DAppAuthConfirm/DAppAuthConfirmTests.swift b/novawalletTests/Modules/DApps/DAppAuthConfirm/DAppAuthConfirmTests.swift index 5bf07eaac..dd48141af 100644 --- a/novawalletTests/Modules/DApps/DAppAuthConfirm/DAppAuthConfirmTests.swift +++ b/novawalletTests/Modules/DApps/DAppAuthConfirm/DAppAuthConfirmTests.swift @@ -114,12 +114,16 @@ class DAppAuthConfirmTests: XCTestCase { requiredChains: .init(), optionalChains: nil ) + + let viewModelFactory = DAppAuthViewModelFactory( + iconViewModelFactory: DAppIconViewModelFactory() + ) let presenter = DAppAuthConfirmPresenter( wireframe: wireframe, request: request, delegate: delegate, - viewModelFactory: DAppAuthViewModelFactory() + viewModelFactory: viewModelFactory ) presenter.view = view diff --git a/novawalletTests/Modules/DApps/DAppBrowser/DAppBrowserTests.swift b/novawalletTests/Modules/DApps/DAppBrowser/DAppBrowserTests.swift index 97f86bda8..990e5454b 100644 --- a/novawalletTests/Modules/DApps/DAppBrowser/DAppBrowserTests.swift +++ b/novawalletTests/Modules/DApps/DAppBrowser/DAppBrowserTests.swift @@ -66,7 +66,10 @@ class DAppBrowserTests: XCTestCase { let tabManager = DAppBrowserTabManager.shared - let tab = DAppBrowserTab(from: dAppURL)! + let tab = DAppBrowserTab( + from: dAppURL, + metaId: walletSettings.value.metaId + )! let interactor = DAppBrowserInteractor( transports: [transport],