Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svojsu committed Jan 13, 2025
1 parent 17d6aa0 commit 15c8f57
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
18 changes: 9 additions & 9 deletions novawalletTests/Mocks/ModuleMocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -4489,9 +4489,9 @@ import Operation_iOS
return .init(stub: cuckoo_manager.createStub(for: MockDAppBrowserViewProtocol.self, method: "didReceive(viewModel: DAppBrowserModel)", parameterMatchers: matchers))
}

func didReceiveTabsCount<M1: Cuckoo.Matchable>(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<M1: Cuckoo.Matchable>(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<M1: Cuckoo.Matchable, M2: Cuckoo.Matchable>(response: M1, forTransport name: M2) -> Cuckoo.ProtocolStubNoReturnFunction<(DAppScriptResponse, String)> where M1.MatchedType == DAppScriptResponse, M2.MatchedType == String {
Expand Down Expand Up @@ -4567,9 +4567,9 @@ import Operation_iOS
}

@discardableResult
func didReceiveTabsCount<M1: Cuckoo.Matchable>(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<M1: Cuckoo.Matchable>(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
Expand Down Expand Up @@ -4655,7 +4655,7 @@ import Operation_iOS



func didReceiveTabsCount(viewModel: String) {
func didReceiveTabsCount(viewModel: DAppBrowserTabsButtonViewModel) {
return DefaultValueRegistry.defaultValue(for: (Void).self)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 15c8f57

Please sign in to comment.