[ios] fix search on map tests for ipad

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2025-02-26 19:19:09 +04:00
parent d21800ec25
commit bc34730de9

View file

@ -131,8 +131,13 @@ final class SearchOnMapTests: XCTestCase {
searchManager.results = results
interactor.handle(.didSelectResult(results[0], withSearchText: searchText))
XCTAssertEqual(currentState, .hidden)
XCTAssertEqual(view.viewModel.presentationStep, .hidden)
if isIPad {
XCTAssertEqual(currentState, .searching)
XCTAssertEqual(view.viewModel.presentationStep, .fullScreen)
} else {
XCTAssertEqual(currentState, .hidden)
XCTAssertEqual(view.viewModel.presentationStep, .hidden)
}
}
func test_GivenSearchIsActive_WhenSelectPlaceOnMap_ThenHideSearch() {
@ -159,8 +164,13 @@ final class SearchOnMapTests: XCTestCase {
searchManager.results = results
interactor.handle(.didSelectResult(results[0], withSearchText: searchText))
XCTAssertEqual(currentState, .hidden)
XCTAssertEqual(view.viewModel.presentationStep, .hidden)
if isIPad {
XCTAssertEqual(currentState, .searching)
XCTAssertEqual(view.viewModel.presentationStep, .fullScreen)
} else {
XCTAssertEqual(currentState, .hidden)
XCTAssertEqual(view.viewModel.presentationStep, .hidden)
}
interactor.handle(.didDeselectPlaceOnMap)
XCTAssertEqual(currentState, .searching)