@@ -38,15 +38,15 @@ private extension DependenciesProvider {
3838
3939@Suite ( . dependencies( . default) ) struct WebpageSnapshotTests {
4040
41- @Test func HomeIndexView_document ( ) throws {
41+ @Test func HomeIndex_document ( ) throws {
4242 Supporters . mock ( )
4343
4444 let page = { HomeIndex . View ( path: " / " , model: . mock) . document ( ) }
4545
4646 assertSnapshot ( of: page, as: . html)
4747 }
4848
49- @Test func HomeIndexView_document_development ( ) throws {
49+ @Test func HomeIndex_document_development ( ) throws {
5050 // Test home page to ensure the dev environment is showing the dev banner and `noindex` for robots
5151 withDependencies {
5252 $0. environment. current = { . development }
@@ -59,7 +59,7 @@ private extension DependenciesProvider {
5959 }
6060 }
6161
62- @Test func MaintenanceMessageIndexView_document ( ) throws {
62+ @Test func MaintenanceMessageIndex_document ( ) throws {
6363 let maintenanceMessage = """
6464 # Server Maintenance
6565
@@ -74,15 +74,15 @@ private extension DependenciesProvider {
7474 assertSnapshot ( of: page, as: . html)
7575 }
7676
77- @Test func PackageShowView_document ( ) throws {
77+ @Test func PackageShow_document ( ) throws {
7878 var model = API . PackageController. GetRoute. Model. mock
7979 model. homepageUrl = " https://swiftpackageindex.com/ "
8080 let page = { PackageShow . View ( path: " " , model: model, packageSchema: . mock) . document ( ) }
8181
8282 assertSnapshot ( of: page, as: . html)
8383 }
8484
85- @Test func PackageShowView_document_binary_targets ( ) throws {
85+ @Test func PackageShow_document_binary_targets ( ) throws {
8686 var model = API . PackageController. GetRoute. Model. mock
8787 model. homepageUrl = " https://swiftpackageindex.com/ "
8888 model. hasBinaryTargets = true
@@ -92,7 +92,7 @@ private extension DependenciesProvider {
9292 assertSnapshot ( of: page, as: . html)
9393 }
9494
95- @Test func PackageShowView_document_few_keywords ( ) throws {
95+ @Test func PackageShow_document_few_keywords ( ) throws {
9696 var model = API . PackageController. GetRoute. Model. mock
9797 let keywordsWithCounts = [ ( " tag1 " , 1 ) ,
9898 ( " tag2 " , 10 ) ,
@@ -108,7 +108,7 @@ private extension DependenciesProvider {
108108 assertSnapshot ( of: page, as: . html)
109109 }
110110
111- @Test func PackageShowView_document_many_keywords ( ) throws {
111+ @Test func PackageShow_document_many_keywords ( ) throws {
112112 var model = API . PackageController. GetRoute. Model. mock
113113 let keywordsWithCounts = [ ( " tag1 " , 1 ) , ( " tag2 " , 10 ) , ( " tag3 " , 100 ) , ( " tag4 " , 1000 ) , ( " tag5 " , 1234 ) ,
114114 ( " tag6 " , 1250 ) , ( " tag7 " , 1249 ) , ( " tag8 " , 1251 ) , ( " tag9 " , 12345 ) ,
@@ -131,7 +131,7 @@ private extension DependenciesProvider {
131131 assertSnapshot ( of: page, as: . html)
132132 }
133133
134- @Test func PackageShowView_document_emoji_summary ( ) throws {
134+ @Test func PackageShow_document_emoji_summary ( ) throws {
135135 var model = API . PackageController. GetRoute. Model. mock
136136 model. summary = " :package: Nothing but Cache. :octocat: "
137137
@@ -140,7 +140,7 @@ private extension DependenciesProvider {
140140 assertSnapshot ( of: page, as: . html)
141141 }
142142
143- @Test func PackageShowView_document_open_source_license ( ) throws {
143+ @Test func PackageShow_document_open_source_license ( ) throws {
144144 var model = API . PackageController. GetRoute. Model. mock
145145 model. license = . mit
146146 model. licenseUrl = " https://example.com/license.html "
@@ -149,7 +149,7 @@ private extension DependenciesProvider {
149149 assertSnapshot ( of: page, as: . html)
150150 }
151151
152- @Test func PackageShowView_document_app_store_incompatible_license ( ) throws {
152+ @Test func PackageShow_document_app_store_incompatible_license ( ) throws {
153153 var model = API . PackageController. GetRoute. Model. mock
154154 model. license = . gpl_3_0
155155 model. licenseUrl = " https://example.com/license.html "
@@ -158,7 +158,7 @@ private extension DependenciesProvider {
158158 assertSnapshot ( of: page, as: . html)
159159 }
160160
161- @Test func PackageShowView_document_other_license ( ) throws {
161+ @Test func PackageShow_document_other_license ( ) throws {
162162 var model = API . PackageController. GetRoute. Model. mock
163163 model. license = . other
164164 model. licenseUrl = " https://example.com/license.html "
@@ -167,7 +167,7 @@ private extension DependenciesProvider {
167167 assertSnapshot ( of: page, as: . html)
168168 }
169169
170- @Test func PackageShowView_document_no_license ( ) throws {
170+ @Test func PackageShow_document_no_license ( ) throws {
171171 var model = API . PackageController. GetRoute. Model. mock
172172 model. license = . none
173173 model. licenseUrl = nil
@@ -176,7 +176,7 @@ private extension DependenciesProvider {
176176 assertSnapshot ( of: page, as: . html)
177177 }
178178
179- @Test func PackageShowView_document_no_authors_activity ( ) throws {
179+ @Test func PackageShow_document_no_authors_activity ( ) throws {
180180 // Test to ensure we don't display empty bullet points when there is
181181 // no author or activity info
182182 var model = API . PackageController. GetRoute. Model. mock
@@ -187,7 +187,7 @@ private extension DependenciesProvider {
187187 assertSnapshot ( of: page, as: . html)
188188 }
189189
190- @Test func PackageShowView_document_withPackageFundingLinks ( ) throws {
190+ @Test func PackageShow_document_withPackageFundingLinks ( ) throws {
191191 var model = API . PackageController. GetRoute. Model. mock
192192 model. fundingLinks = [
193193 . init( platform: . gitHub, url: " https://github.com/sponsor-url " ) ,
@@ -200,15 +200,15 @@ private extension DependenciesProvider {
200200 assertSnapshot ( of: page, as: . html)
201201 }
202202
203- @Test func PackageShowView_document_with_documentation_link ( ) throws {
203+ @Test func PackageShow_document_with_documentation_link ( ) throws {
204204 var model = API . PackageController. GetRoute. Model. mock
205205 model. documentationTarget = . internal( docVersion: . reference( " main " ) , archive: " archive " )
206206 let page = { PackageShow . View ( path: " " , model: model, packageSchema: . mock) . document ( ) }
207207
208208 assertSnapshot ( of: page, as: . html)
209209 }
210210
211- @Test func PackageShowView_document_single_row_tables ( ) throws {
211+ @Test func PackageShow_document_single_row_tables ( ) throws {
212212 // Test display when all three significant version collapse to a single row
213213 var model = API . PackageController. GetRoute. Model. mock
214214 do {
@@ -240,7 +240,7 @@ private extension DependenciesProvider {
240240 assertSnapshot ( of: page, as: . html)
241241 }
242242
243- @Test func PackageShowView_document_no_builds ( ) throws {
243+ @Test func PackageShow_document_no_builds ( ) throws {
244244 // Test display when there are no builds
245245 var model = API . PackageController. GetRoute. Model. mock
246246 model. swiftVersionBuildInfo = . init( stable: nil , beta: nil , latest: nil )
@@ -250,7 +250,7 @@ private extension DependenciesProvider {
250250 assertSnapshot ( of: page, as: . html)
251251 }
252252
253- @Test func PackageShowView_document_canonicalURL_noImageSnapshots ( ) throws {
253+ @Test func PackageShow_document_canonicalURL_noImageSnapshots ( ) throws {
254254 // In production, the owner and repository name in the view model are fetched from
255255 // the database and have canonical capitalisation.
256256 var model = API . PackageController. GetRoute. Model. mock
@@ -261,20 +261,20 @@ private extension DependenciesProvider {
261261 assertSnapshot ( of: page, as: . html)
262262 }
263263
264- @Test func PackageShowView_document_missingPackage ( ) throws {
264+ @Test func MissingPackage_document ( ) throws {
265265 let page = { MissingPackage . View ( path: " " , model: . mock) . document ( ) }
266266 assertSnapshot ( of: page, as: . html)
267267 }
268268
269- @Test func PackageReadmeView_document ( ) throws {
269+ @Test func PackageReadme_document ( ) throws {
270270 let model = PackageReadme . Model. mock
271271 let page = { PackageReadme . View ( model: model) . document ( ) }
272272
273273 assertSnapshot ( of: page, as: . html)
274274 }
275275
276276 // Note: This snapshot test deliberately omits an image snapshot as the HTML being tested has no explicit styling.
277- @Test func PackageReadmeView_document_unparseableReadme_noImageSnapshots ( ) throws {
277+ @Test func PackageReadme_document_unparseableReadme_noImageSnapshots ( ) throws {
278278 let model = PackageReadme . Model ( url: " https://example.com/owner/repo/README " ,
279279 repositoryOwner: " owner " ,
280280 repositoryName: " repo " ,
@@ -286,14 +286,14 @@ private extension DependenciesProvider {
286286 }
287287
288288 // Note: This snapshot test deliberately omits an image snapshot as the HTML being tested has no explicit styling.
289- @Test func PackageReadmeView_document_noReadme_noImageSnapshots ( ) throws {
289+ @Test func PackageReadme_document_noReadme_noImageSnapshots ( ) throws {
290290 let model = PackageReadme . Model. noReadme
291291 let page = { PackageReadme . View ( model: model) . document ( ) }
292292
293293 assertSnapshot ( of: page, as: . html)
294294 }
295295
296- @Test func PackageShowView_document_customCollection ( ) throws {
296+ @Test func PackageShow_document_customCollection ( ) throws {
297297 var model = API . PackageController. GetRoute. Model. mock
298298 model. homepageUrl = " https://swiftpackageindex.com/ "
299299 model. customCollections = [ . init( key: " custom-collection " ,
@@ -304,20 +304,20 @@ private extension DependenciesProvider {
304304 assertSnapshot ( of: page, as: . html)
305305 }
306306
307- @Test func PackageReleasesView_document ( ) throws {
307+ @Test func PackageReleases_document ( ) throws {
308308 let model = PackageReleases . Model. mock
309309 let page = { PackageReleases . View ( model: model) . document ( ) }
310310
311311 assertSnapshot ( of: page, as: . html)
312312 }
313313
314- @Test func PackageReleasesView_document_NoModel ( ) throws {
314+ @Test func PackageReleases_document_NoModel ( ) throws {
315315 let page = { PackageReleases . View ( model: nil ) . document ( ) }
316316
317317 assertSnapshot ( of: page, as: . html)
318318 }
319319
320- @Test func ErrorPageView_document ( ) throws {
320+ @Test func ErrorPage_document ( ) throws {
321321 let page = { ErrorPage . View ( path: " " , error: Abort ( . notFound) ) . document ( ) }
322322
323323 assertSnapshot ( of: page, as: . html)
0 commit comments