Skip to content

Add UI Testing App with UI Test Target + 3 starter tests #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0e62606
Add UI testing framework
dfeinzimer Jun 30, 2023
100791e
Change to Xcode 14
dfeinzimer Jul 6, 2023
658eab3
Update project.pbxproj
dfeinzimer Jul 6, 2023
6b478d6
Update tests
dfeinzimer Jul 11, 2023
356fe3f
Update FloorFilterExampleView.swift
dfeinzimer Jul 11, 2023
dc0ea3c
Update BookmarksTestView.swift
dfeinzimer Jul 12, 2023
b415698
Update BookmarksTests.swift
dfeinzimer Jul 12, 2023
0446e63
Update FloorFilterTestView.swift
dfeinzimer Jul 12, 2023
1c75be9
Update FloorFilterTests.swift
dfeinzimer Jul 12, 2023
99661a5
Update FloorFilterTestView.swift
dfeinzimer Jul 12, 2023
ccbf7bd
Remove Mac from `UITests` target supported platforms
dfeinzimer Jul 12, 2023
a9c6616
Remove Mac from `UI Test Runner` target supported platforms
dfeinzimer Jul 12, 2023
09c2027
Add support for Mac Catalyst to `UI Test Runner` target
dfeinzimer Jul 12, 2023
1a1f174
Update project.pbxproj
dfeinzimer Jul 12, 2023
c282b2e
Update FloorFilterExampleView.swift
dfeinzimer Jul 12, 2023
b378f2a
Update FloorFilterExampleView.swift
dfeinzimer Jul 12, 2023
807cf9d
Update FloorFilterExampleView.swift
dfeinzimer Jul 12, 2023
72619de
Update project.pbxproj
dfeinzimer Jul 12, 2023
19ffb25
Update BasemapGalleryTestView.swift
dfeinzimer Jul 12, 2023
3dde173
Update BasemapGalleryExampleView.swift
dfeinzimer Jul 12, 2023
775e3b0
Update BookmarksTestView.swift
dfeinzimer Jul 12, 2023
4d046f8
Update BookmarksTestView.swift
dfeinzimer Jul 12, 2023
1a0db9e
Update UI Test Runner/UI Test Runner/TestViews/BookmarksTestView.swift
dfeinzimer Jul 12, 2023
b21f2ad
Merge branch 'df/uiTestRunner' of https://github.com/Esri/arcgis-maps…
dfeinzimer Jul 12, 2023
70eac0f
Update FloorFilterTestView.swift
dfeinzimer Jul 12, 2023
85705ae
Update FloorFilterExampleView.swift
dfeinzimer Jul 12, 2023
f59d778
Update FloorFilterTestView.swift
dfeinzimer Jul 12, 2023
e455a33
Update FloorFilterTestView.swift
dfeinzimer Jul 12, 2023
d499a38
Update Tests.swift
dfeinzimer Jul 12, 2023
1c3f7fb
Update BookmarksTests.swift
dfeinzimer Jul 12, 2023
09996c0
Update FloorFilterTests.swift
dfeinzimer Jul 13, 2023
f1c6449
Update BasemapGalleryTests.swift
dfeinzimer Jul 13, 2023
a35b76c
Update BookmarksTests.swift
dfeinzimer Jul 13, 2023
06d01b3
Fix Bookmarks Catalyst tests
dfeinzimer Jul 13, 2023
2c9feb6
Update project.pbxproj
dfeinzimer Jul 14, 2023
6783ba4
Update FloorFilterTestView.swift
dfeinzimer Jul 14, 2023
8a9dfe7
Fix BM gallery tests for Catalyst
dfeinzimer Jul 14, 2023
8b8e95e
Update FloorFilterTests.swift
dfeinzimer Jul 14, 2023
bfd1e4b
Update BasemapGalleryTests.swift
dfeinzimer Jul 14, 2023
13fb3d5
Update project.pbxproj
dfeinzimer Jul 17, 2023
8c4c7ff
Update project.pbxproj
dfeinzimer Jul 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions Examples/Examples/FloorFilterExampleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import SwiftUI
import ArcGISToolkit
import ArcGIS
import ArcGISToolkit
import SwiftUI

struct FloorFilterExampleView: View {
/// Make a map from a portal item.
static func makeMap() -> Map {
Map(item: PortalItem(
portal: .arcGISOnline(connection: .anonymous),
id: Item.ID("b4b599a43a474d33946cf0df526426f5")!
))
}

/// Determines the arrangement of the inner `FloorFilter` UI components.
private let floorFilterAlignment = Alignment.bottomLeading

Expand All @@ -36,6 +28,13 @@ struct FloorFilterExampleView: View {
/// A Boolean value indicating whether the map is currently being navigated.
@State private var isNavigating = false

/// The `Map` displayed in the `MapView`.
@State private var map = Map(item: PortalItem(
portal: .arcGISOnline(connection: .anonymous),
id: Item.ID("b4b599a43a474d33946cf0df526426f5")!
))

/// A Boolean value indicating whether an error was encountered while loading the map.
@State private var mapLoadError = false

/// The initial viewpoint of the map.
Expand All @@ -48,14 +47,9 @@ struct FloorFilterExampleView: View {
scale: 100_000
)

/// The data model containing the `Map` displayed in the `MapView`.
@StateObject private var dataModel = MapDataModel(
map: makeMap()
)

var body: some View {
MapView(
map: dataModel.map,
map: map,
viewpoint: viewpoint
)
.onAttributionBarHeightChanged { newHeight in
Expand All @@ -71,7 +65,7 @@ struct FloorFilterExampleView: View {
.ignoresSafeArea(.keyboard, edges: .bottom)
.overlay(alignment: floorFilterAlignment) {
if isMapLoaded,
let floorManager = dataModel.map.floorManager {
let floorManager = map.floorManager {
FloorFilter(
floorManager: floorManager,
alignment: floorFilterAlignment,
Expand Down Expand Up @@ -99,7 +93,7 @@ struct FloorFilterExampleView: View {
}
.task {
do {
try await dataModel.map.load()
try await map.load()
isMapLoaded = true
} catch {
mapLoadError = true
Expand Down
Loading