@@ -11,73 +11,94 @@ final class MapControlsTests: XCTestCase {
11
11
@MainActor
12
12
func testEmptyControls( ) {
13
13
assertView {
14
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
15
- . mapControls {
16
- // No controls
17
- }
14
+ MapView (
15
+ styleURL: demoTilesURL,
16
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
17
+ )
18
+ . mapControls {
19
+ // No controls
20
+ }
18
21
}
19
22
}
20
23
21
24
@MainActor
22
25
func testLogoOnly( ) {
23
26
assertView {
24
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
25
- . mapControls {
26
- LogoView ( )
27
- }
27
+ MapView (
28
+ styleURL: demoTilesURL,
29
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
30
+ )
31
+ . mapControls {
32
+ LogoView ( )
33
+ }
28
34
}
29
35
}
30
36
31
37
@MainActor
32
38
func testLogoChangePosition( ) {
33
39
assertView {
34
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
35
- . mapControls {
36
- LogoView ( )
37
- . position ( . topLeft)
38
- }
40
+ MapView (
41
+ styleURL: demoTilesURL,
42
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
43
+ )
44
+ . mapControls {
45
+ LogoView ( )
46
+ . position ( . topLeft)
47
+ }
39
48
}
40
49
}
41
50
42
51
@MainActor
43
52
func testCompassOnly( ) {
44
53
assertView {
45
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
46
- . mapControls {
47
- CompassView ( )
48
- }
54
+ MapView (
55
+ styleURL: demoTilesURL,
56
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
57
+ )
58
+ . mapControls {
59
+ CompassView ( )
60
+ }
49
61
}
50
62
}
51
63
52
64
@MainActor
53
65
func testCompassChangePosition( ) {
54
66
assertView {
55
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
56
- . mapControls {
57
- CompassView ( )
58
- . position ( . topLeft)
59
- }
67
+ MapView (
68
+ styleURL: demoTilesURL,
69
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
70
+ )
71
+ . mapControls {
72
+ CompassView ( )
73
+ . position ( . topLeft)
74
+ }
60
75
}
61
76
}
62
77
63
78
@MainActor
64
79
func testAttributionOnly( ) {
65
80
assertView {
66
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
67
- . mapControls {
68
- AttributionButton ( )
69
- }
81
+ MapView (
82
+ styleURL: demoTilesURL,
83
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
84
+ )
85
+ . mapControls {
86
+ AttributionButton ( )
87
+ }
70
88
}
71
89
}
72
90
73
91
@MainActor
74
92
func testAttributionChangePosition( ) {
75
93
assertView {
76
- MapView ( styleURL: demoTilesURL, camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) ) )
77
- . mapControls {
78
- AttributionButton ( )
79
- . position ( . topLeft)
80
- }
94
+ MapView (
95
+ styleURL: demoTilesURL,
96
+ camera: . constant( . center( CLLocationCoordinate2D ( ) , zoom: 4 , direction: 45 ) )
97
+ )
98
+ . mapControls {
99
+ AttributionButton ( )
100
+ . position ( . topLeft)
101
+ }
81
102
}
82
103
}
83
104
}
0 commit comments