This PR contains the work done to amend the `.env.local` handling for the Website service, plus other small fixes. Reviewed-on: rock-n-code/loud-amsterdam#19 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
32 lines
867 B
Swift
32 lines
867 B
Swift
import Elementary
|
|
import Foundation
|
|
import Testing
|
|
|
|
@testable import WebsiteLibrary
|
|
|
|
@Suite("IndexPage page", .tags(.page))
|
|
struct IndexPageTests {
|
|
|
|
// MARK: Functional tests
|
|
|
|
@Test
|
|
func `renders its markup`() {
|
|
let html = IndexPage(
|
|
locale: .init(identifier: "en")
|
|
).render()
|
|
|
|
#expect(html.contains("<!DOCTYPE html>"))
|
|
#expect(html.contains(#"lang="en""#))
|
|
#expect(html.contains("/css/shared.css"))
|
|
#expect(html.contains("/css/index.css"))
|
|
#expect(html.contains("/favicon.ico"))
|
|
#expect(html.contains("/icon.svg"))
|
|
#expect(html.contains("/apple-touch-icon.png"))
|
|
#expect(html.contains("/site.webmanifest"))
|
|
#expect(html.contains("Hello world!"))
|
|
#expect(html.contains("/js/shared.js"))
|
|
#expect(html.contains("/js/index.js"))
|
|
}
|
|
|
|
}
|