Skip to content

Commit

Permalink
Add token snapshot test (though it doesn't work at the moment, like t…
Browse files Browse the repository at this point in the history
…he rest)
  • Loading branch information
ianthetechie committed Mar 17, 2024
1 parent 05c7af3 commit b7f55bb
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 8 deletions.
51 changes: 43 additions & 8 deletions Tests/MapLibreSwiftUITests/Examples/MapControlsTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
//
// File.swift
//
//
// Created by Ian Wagner on 2024-03-18.
//

import Foundation
import MapLibreSwiftDSL
import SnapshotTesting
import XCTest
@testable import MapLibreSwiftUI

final class MapControlsTests: XCTestCase {
func testEmptyControls() {
assertView {
MapView(styleURL: demoTilesURL)
.mapControls {
// No controls
}
}
}

func testLogoOnly() {
assertView {
MapView(styleURL: demoTilesURL)
.mapControls {
LogoView()
}
}
}

func testCompassOnly() {
assertView {
MapView(styleURL: demoTilesURL)
.mapControls {
CompassView()
}
}
}

func testCompassChangePosition() {
assertView {
MapView(styleURL: demoTilesURL)
.mapControls {
CompassView()
.position(.topLeft)
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b7f55bb

Please sign in to comment.