diff --git a/Services/Website/Resources/Static/css/error.css b/Services/Website/Resources/Static/css/not-found.css similarity index 100% rename from Services/Website/Resources/Static/css/error.css rename to Services/Website/Resources/Static/css/not-found.css diff --git a/Services/Website/Resources/Static/js/error.js b/Services/Website/Resources/Static/js/not-found.js similarity index 100% rename from Services/Website/Resources/Static/js/error.js rename to Services/Website/Resources/Static/js/not-found.js diff --git a/Services/Website/Sources/Library/Internal/Enumerations/StaticFile.swift b/Services/Website/Sources/Library/Internal/Enumerations/StaticFile.swift index 3196f8f..945ca74 100644 --- a/Services/Website/Sources/Library/Internal/Enumerations/StaticFile.swift +++ b/Services/Website/Sources/Library/Internal/Enumerations/StaticFile.swift @@ -7,8 +7,6 @@ import Infrastructure enum StaticFile: Asset, CaseIterable { /// The `apple-touch-icon.png` icon. case appleTouchIcon - /// The `css/error.css` stylesheet and `js/error.js` script for the not-found page. - case error /// The `favicon.ico` icon. case favicon /// The `icon.svg` icon. @@ -19,6 +17,8 @@ enum StaticFile: Asset, CaseIterable { case icon512 /// The `css/index.css` stylesheet and `js/index.js` script for the landing page. case index + /// The `css/not-found.css` stylesheet and `js/not-found.js` script for the not-found page. + case notFound /// The `robots.txt` crawler directives. case robots /// The `css/shared.css` stylesheet and `js/shared.js` script shared across pages. @@ -41,8 +41,8 @@ extension StaticFile { case .appleTouchIcon, .icon192, .icon512: [.png] - case .error, - .index, + case .index, + .notFound, .shared: [.css, .js] case .favicon: [.ico] case .icon: [.svg] @@ -56,12 +56,12 @@ extension StaticFile { var fileName: String { switch self { case .appleTouchIcon: "apple-touch-icon" - case .error: "error" case .favicon: "favicon" case .icon: "icon" case .icon192: "icon-192" case .icon512: "icon-512" case .index: "index" + case .notFound: "not-found" case .robots: "robots" case .shared: "shared" case .site: "site" diff --git a/Services/Website/Tests/App/AppTests.swift b/Services/Website/Tests/App/AppTests.swift index 70fce3c..846ccf2 100644 --- a/Services/Website/Tests/App/AppTests.swift +++ b/Services/Website/Tests/App/AppTests.swift @@ -268,7 +268,7 @@ struct AppTests { ) { response in let body = String(buffer: response.body) - #expect(body.contains("/css/error.css?v=")) + #expect(body.contains("/css/not-found.css?v=")) #expect(body.contains("/js/shared.js?v=")) } } diff --git a/Services/Website/Tests/Library/Cases/Internal/Enumerations/StaticFileTests.swift b/Services/Website/Tests/Library/Cases/Internal/Enumerations/StaticFileTests.swift index 0c141e5..b675544 100644 --- a/Services/Website/Tests/Library/Cases/Internal/Enumerations/StaticFileTests.swift +++ b/Services/Website/Tests/Library/Cases/Internal/Enumerations/StaticFileTests.swift @@ -54,12 +54,12 @@ private extension StaticFileTests { static let fileExtensions: [[AssetExtension]] = [ [.png], - [.css, .js], [.ico], [.svg], [.png], [.png], [.css, .js], + [.css, .js], [.txt], [.css, .js], [.webmanifest], @@ -67,12 +67,12 @@ private extension StaticFileTests { ] static let fileNames: [String] = [ "apple-touch-icon", - "error", "favicon", "icon", "icon-192", "icon-512", "index", + "not-found", "robots", "shared", "site", diff --git a/Services/Website/Tests/Library/Cases/Internal/Pages/NotFoundPageTests.swift b/Services/Website/Tests/Library/Cases/Internal/Pages/NotFoundPageTests.swift index d29b2d0..21786cd 100644 --- a/Services/Website/Tests/Library/Cases/Internal/Pages/NotFoundPageTests.swift +++ b/Services/Website/Tests/Library/Cases/Internal/Pages/NotFoundPageTests.swift @@ -23,8 +23,8 @@ struct NotFoundPageTests { #expect(html.contains("Page Not Found")) #expect(html.contains("Sorry, but the page you were trying to view does not exist.")) #expect(html.contains("/css/shared.css")) - #expect(html.contains("/css/error.css")) - #expect(html.contains("/js/error.js")) + #expect(html.contains("/css/not-found.css")) + #expect(html.contains("/js/not-found.js")) #expect(html.contains("/js/shared.js")) }