Skip to content

Commit 765e87b

Browse files
committed
test: add missing Cuckoo stubs for alert presentation and fee view model\n\n- AccountExportPasswordTests: stub SheetAlertPresentable.present(viewModel:from:)\n- ControllerAccountTests: stub view.didReceive(feeViewModel:)\n\nFixes intermittent Cuckoo 'No stub for method' failures on CI.
Signed-off-by: William Richter <richter@soramitsu.co.jp>
1 parent ce458b9 commit 765e87b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fearlessTests/Modules/AccountExportPassword/AccountExportPasswordTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class AccountExportPasswordTests: XCTestCase {
5858
when(stub.showJSONExport(any(), flow: any(), from: any())).then { _ in
5959
expectation.fulfill()
6060
}
61+
// Some flows present a sheet warning via SheetAlertPresentable; allow it silently
62+
when(stub.present(viewModel: any(), from: any())).thenDoNothing()
6163
when(stub.present(message: any(), title: any(), closeAction: any(), from: any(), actions: any())).then { _ in
6264
XCTFail()
6365
}

fearlessTests/Modules/ControllerAccount/ControllerAccountTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class ControllerAccountTests: XCTestCase {
3737

3838
stub(view) { stub in
3939
when(stub.localizationManager.get).then { LocalizationManager.shared }
40+
// Presenter pushes fee view model updates to the view; accept silently
41+
when(stub.didReceive(feeViewModel: any())).thenDoNothing()
4042
}
4143

4244
// given

0 commit comments

Comments
 (0)