Skip to content

Commit b7f55bb

Browse files
committed
Add token snapshot test (though it doesn't work at the moment, like the rest)
1 parent 05c7af3 commit b7f55bb

File tree

5 files changed

+43
-8
lines changed

5 files changed

+43
-8
lines changed
Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,43 @@
1-
//
2-
// File.swift
3-
//
4-
//
5-
// Created by Ian Wagner on 2024-03-18.
6-
//
7-
8-
import Foundation
1+
import MapLibreSwiftDSL
2+
import SnapshotTesting
3+
import XCTest
4+
@testable import MapLibreSwiftUI
5+
6+
final class MapControlsTests: XCTestCase {
7+
func testEmptyControls() {
8+
assertView {
9+
MapView(styleURL: demoTilesURL)
10+
.mapControls {
11+
// No controls
12+
}
13+
}
14+
}
15+
16+
func testLogoOnly() {
17+
assertView {
18+
MapView(styleURL: demoTilesURL)
19+
.mapControls {
20+
LogoView()
21+
}
22+
}
23+
}
24+
25+
func testCompassOnly() {
26+
assertView {
27+
MapView(styleURL: demoTilesURL)
28+
.mapControls {
29+
CompassView()
30+
}
31+
}
32+
}
33+
34+
func testCompassChangePosition() {
35+
assertView {
36+
MapView(styleURL: demoTilesURL)
37+
.mapControls {
38+
CompassView()
39+
.position(.topLeft)
40+
}
41+
}
42+
}
43+
}
69.2 KB
Loading
69.2 KB
Loading
69.2 KB
Loading
77.8 KB
Loading

0 commit comments

Comments
 (0)