Skip to content

Commit 578c6f6

Browse files
author
Alexey Naumov
committed
Update tests for the latest ViewInspector and iOS 15
1 parent a175f08 commit 578c6f6

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

CountriesSwiftUI.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@
10131013
repositoryURL = "https://github.com/nalexn/ViewInspector";
10141014
requirement = {
10151015
kind = exactVersion;
1016-
version = 0.8.1;
1016+
version = 0.9.0;
10171017
};
10181018
};
10191019
F6E7ACE023F5D1EC00AB48AB /* XCRemoteSwiftPackageReference "EnvironmentOverrides" */ = {

UnitTests/UI/CountriesListTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ final class LocalizationTests: XCTestCase {
141141

142142
extension InspectableView where View == ViewType.View<CountriesList> {
143143
func content() throws -> InspectableView<ViewType.AnyView> {
144-
return try geometryReader().navigationView()
145-
.navigationBarItems(AnyView.self).anyView()
144+
return try find(ViewType.AnyView.self)
146145
}
147146
}

UnitTests/UI/CountryDetailsTests.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,7 @@ final class CountryDetailsTests: XCTestCase {
111111
}
112112

113113
func test_sheetPresentation() {
114-
let images: [MockedImagesInteractor.Action]
115-
if #available(iOS 14.0, *) {
116-
// Image is requested by Details sheet only:
117-
images = [.loadImage(country.flag)]
118-
} else {
119-
// Image is requested by CountryDetails and Details sheet:
120-
images = [.loadImage(country.flag), .loadImage(country.flag)]
121-
}
114+
let images: [MockedImagesInteractor.Action] = [.loadImage(country.flag), .loadImage(country.flag)]
122115
let interactors = DIContainer.Interactors.mocked(
123116
imagesInteractor: images
124117
)

0 commit comments

Comments
 (0)