@@ -7,7 +7,7 @@ final class SnapshotTests: XCTestCase {
77
88 override func setUp( ) {
99 super. setUp ( )
10- continueAfterFailure = false
10+ continueAfterFailure = true
1111 app = XCUIApplication ( )
1212 app. launchArguments += [ " -DEMO_MODE " ]
1313 setupSnapshot ( app)
@@ -22,6 +22,9 @@ final class SnapshotTests: XCTestCase {
2222 func testScreenshots( ) {
2323 snapshot ( " 01-Dashboard " )
2424
25+ app. swipeUp ( )
26+ sleep ( 1 )
27+
2528 let configurationsText = app. staticTexts [ " Configurations " ]
2629 if configurationsText. exists {
2730 configurationsText. tap ( )
@@ -45,8 +48,139 @@ final class SnapshotTests: XCTestCase {
4548 snapshot ( " 04-BugReport " )
4649 dismissSheet ( )
4750 }
51+
52+ app. swipeDown ( )
53+ sleep ( 1 )
54+
55+ let cameraCard = app. staticTexts [ " GoPro 0841 " ]
56+ if cameraCard. exists {
57+ cameraCard. tap ( )
58+ sleep ( 2 )
59+ snapshot ( " 05-CameraDetails " )
60+ dismissSheet ( )
61+ }
62+ }
63+
64+ func testEditConfigScreenshot( ) {
65+ app. swipeUp ( )
66+ sleep ( 1 )
67+
68+ let configurationsText = app. staticTexts [ " Configurations " ]
69+ if configurationsText. exists {
70+ configurationsText. tap ( )
71+ sleep ( 1 )
72+
73+ let actionsButton = app. buttons. matching ( identifier: " Config Actions " ) . firstMatch
74+ if actionsButton. waitForExistence ( timeout: 3 ) {
75+ actionsButton. tap ( )
76+ sleep ( 1 )
77+ let editButton = app. buttons [ " Edit " ]
78+ if editButton. waitForExistence ( timeout: 3 ) {
79+ editButton. tap ( )
80+ sleep ( 1 )
81+ snapshot ( " 06-EditConfiguration " )
82+ }
83+ }
84+ }
85+ }
86+
87+ func testEditCameraGroupScreenshot( ) {
88+ app. swipeUp ( )
89+ sleep ( 1 )
90+
91+ let cameraGroupsText = app. staticTexts [ " Camera Groups " ]
92+ if cameraGroupsText. exists {
93+ cameraGroupsText. tap ( )
94+ sleep ( 1 )
95+
96+ let ellipsisButton = app. buttons [ " Group Actions " ]
97+ if ellipsisButton. waitForExistence ( timeout: 3 ) {
98+ ellipsisButton. tap ( )
99+ sleep ( 1 )
100+ let editButton = app. buttons [ " Edit " ]
101+ if editButton. waitForExistence ( timeout: 3 ) {
102+ editButton. tap ( )
103+ sleep ( 1 )
104+ snapshot ( " 07-EditCameraGroup " )
105+ }
106+ }
107+ }
48108 }
49109
110+ func testAddCameraScreenshot( ) {
111+ app. swipeUp ( )
112+ sleep ( 2 )
113+
114+ let cameraGroupsText = app. staticTexts [ " Camera Groups " ]
115+ guard cameraGroupsText. waitForExistence ( timeout: 5 ) else { return }
116+ cameraGroupsText. tap ( )
117+ sleep ( 2 )
118+
119+ let ellipsisButton = app. buttons [ " Group Actions " ]
120+ guard ellipsisButton. waitForExistence ( timeout: 5 ) else { return }
121+ ellipsisButton. tap ( )
122+ sleep ( 2 )
123+
124+ let editButton = app. buttons [ " Edit " ]
125+ guard editButton. waitForExistence ( timeout: 5 ) else { return }
126+ editButton. tap ( )
127+ sleep ( 2 )
128+
129+ let addCameraButton = app. buttons [ " AddCameraButton " ]
130+ guard addCameraButton. waitForExistence ( timeout: 5 ) else { return }
131+ addCameraButton. tap ( )
132+ sleep ( 2 )
133+ snapshot ( " 08-AddCamera " )
134+ }
135+
136+ func testAddCameraGroupScreenshot( ) {
137+ app. swipeUp ( )
138+ sleep ( 2 )
139+
140+ let cameraGroupsText = app. staticTexts [ " Camera Groups " ]
141+ guard cameraGroupsText. waitForExistence ( timeout: 5 ) else { return }
142+ cameraGroupsText. tap ( )
143+ sleep ( 2 )
144+
145+ let addGroupButton = app. buttons [ " Add Group " ]
146+ guard addGroupButton. waitForExistence ( timeout: 5 ) else { return }
147+ addGroupButton. tap ( )
148+ sleep ( 2 )
149+ snapshot ( " 09-AddCameraGroup " )
150+ }
151+
152+ func testVoiceNotificationsScreenshot( ) {
153+ app. swipeUp ( )
154+ sleep ( 1 )
155+
156+ let voiceText = app. staticTexts [ " Voice Notifications " ]
157+ if voiceText. exists {
158+ voiceText. tap ( )
159+ sleep ( 1 )
160+ snapshot ( " 10-VoiceNotifications " )
161+ }
162+ }
163+
164+ func testQRCodeScreenshot( ) {
165+ app. swipeUp ( )
166+ sleep ( 1 )
167+ app. swipeUp ( )
168+ sleep ( 1 )
169+
170+ let qrCodesButton = app. staticTexts [ " QR Codes " ]
171+ if qrCodesButton. exists {
172+ qrCodesButton. tap ( )
173+ sleep ( 2 )
174+ app. swipeUp ( )
175+ sleep ( 1 )
176+ app. swipeUp ( )
177+ sleep ( 1 )
178+ snapshot ( " 11-QRCodes " )
179+ }
180+ }
181+
182+ // MARK: - Helpers
183+
50184 private func dismissSheet( ) {
51185 if app. navigationBars. buttons. firstMatch. exists {
52186 app. navigationBars. buttons. firstMatch. tap ( )
0 commit comments