-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add token snapshot test (though it doesn't work at the moment, like t…
…he rest)
- Loading branch information
1 parent
05c7af3
commit b7f55bb
Showing
5 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
51 changes: 43 additions & 8 deletions
51
Tests/MapLibreSwiftUITests/Examples/MapControlsTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} | ||
} | ||
} |
Binary file added
BIN
+69.2 KB
...UITests/Examples/__Snapshots__/MapControlsTests/testCompassChangePosition.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.2 KB
...LibreSwiftUITests/Examples/__Snapshots__/MapControlsTests/testCompassOnly.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.2 KB
...breSwiftUITests/Examples/__Snapshots__/MapControlsTests/testEmptyControls.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+77.8 KB
...MapLibreSwiftUITests/Examples/__Snapshots__/MapControlsTests/testLogoOnly.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.