From 58023c4dbc832e4efece560f38dd02f2d475abfb Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Wed, 28 Jan 2026 10:26:59 -0500 Subject: [PATCH] feat: Adds view snapshot tests --- Package.resolved | 20 +- Package.swift | 19 + Sources/DatabaseClient/Projects.swift | 2 +- .../HTMLSnapshotTesting/Snapshotting.swift | 22 + Sources/ManualDCore/Project.swift | 26 +- Sources/ManualDCore/User.swift | 12 + Sources/ManualDCore/UserProfile.swift | 25 + .../ManualDClientTests.swift | 48 +- .../ViewControllerTests.swift | 208 +++ .../ViewControllerTests/login.1.html | 79 + .../ViewControllerTests/projectDetail.1.html | 251 +++ .../ViewControllerTests/projectDetail.2.html | 593 +++++++ .../ViewControllerTests/projectDetail.3.html | 236 +++ .../ViewControllerTests/projectDetail.4.html | 366 ++++ .../ViewControllerTests/projectDetail.5.html | 442 +++++ .../ViewControllerTests/projectDetail.6.html | 1559 +++++++++++++++++ .../ViewControllerTests/projectIndex.1.html | 111 ++ .../ViewControllerTests/signup.1.html | 79 + .../ViewControllerTests/userProfile.1.html | 159 ++ 19 files changed, 4221 insertions(+), 36 deletions(-) create mode 100644 Sources/HTMLSnapshotTesting/Snapshotting.swift create mode 100644 Tests/ViewControllerTests/ViewControllerTests.swift create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/login.1.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.1.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.2.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.3.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.4.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.5.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.6.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectIndex.1.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/signup.1.html create mode 100644 Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/userProfile.1.html diff --git a/Package.resolved b/Package.resolved index 5858eb1..8cc2eb4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "5d6dad57209ac74e3c47d8e8eb162768b81c9e63e15df87d29019d46a13cfec2", + "originHash" : "c3efcfd33bc1490f59ae406e4e5292027b2d01cafee9fc625652213505df50fb", "pins" : [ { "identity" : "async-http-client", @@ -226,6 +226,15 @@ "version" : "4.2.0" } }, + { + "identity" : "swift-custom-dump", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-custom-dump", + "state" : { + "revision" : "93a8aa4937030b606de42f44b17870249f49af0b", + "version" : "1.3.4" + } + }, { "identity" : "swift-dependencies", "kind" : "remoteSourceControl", @@ -361,6 +370,15 @@ "version" : "2.9.1" } }, + { + "identity" : "swift-snapshot-testing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing", + "state" : { + "revision" : "a8b7c5e0ed33d8ab8887d1654d9b59f2cbad529b", + "version" : "1.18.7" + } + }, { "identity" : "swift-syntax", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index ff70882..8e01c5d 100644 --- a/Package.swift +++ b/Package.swift @@ -10,6 +10,7 @@ let package = Package( .library(name: "AuthClient", targets: ["AuthClient"]), .library(name: "DatabaseClient", targets: ["DatabaseClient"]), .library(name: "FileClient", targets: ["FileClient"]), + .library(name: "HTMLSnapshotTesting", targets: ["HTMLSnapshotTesting"]), .library(name: "PdfClient", targets: ["PdfClient"]), .library(name: "ProjectClient", targets: ["ProjectClient"]), .library(name: "ManualDCore", targets: ["ManualDCore"]), @@ -23,6 +24,7 @@ let package = Package( .package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.6.0"), .package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"), .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.12.0"), .package(url: "https://github.com/pointfreeco/swift-url-routing.git", from: "0.6.2"), .package(url: "https://github.com/pointfreeco/vapor-routing.git", from: "0.1.3"), .package(url: "https://github.com/pointfreeco/swift-case-paths.git", from: "1.6.0"), @@ -84,6 +86,13 @@ let package = Package( .product(name: "DependenciesMacros", package: "swift-dependencies"), ] ), + .target( + name: "HTMLSnapshotTesting", + dependencies: [ + .product(name: "Elementary", package: "elementary"), + .product(name: "SnapshotTesting", package: "swift-snapshot-testing"), + ] + ), .target( name: "PdfClient", dependencies: [ @@ -156,5 +165,15 @@ let package = Package( .product(name: "Vapor", package: "vapor"), ] ), + .testTarget( + name: "ViewControllerTests", + dependencies: [ + .target(name: "ViewController"), + .target(name: "HTMLSnapshotTesting"), + ], + resources: [ + .copy("__Snapshots__") + ] + ), ] ) diff --git a/Sources/DatabaseClient/Projects.swift b/Sources/DatabaseClient/Projects.swift index 0aacecd..054ce97 100644 --- a/Sources/DatabaseClient/Projects.swift +++ b/Sources/DatabaseClient/Projects.swift @@ -46,7 +46,7 @@ extension DatabaseClient.Projects: TestDependencyKey { { trunk in trunk.with( \.$rooms, - { + { $0.with(\.$room) } ) diff --git a/Sources/HTMLSnapshotTesting/Snapshotting.swift b/Sources/HTMLSnapshotTesting/Snapshotting.swift new file mode 100644 index 0000000..fa11701 --- /dev/null +++ b/Sources/HTMLSnapshotTesting/Snapshotting.swift @@ -0,0 +1,22 @@ +import Elementary +import SnapshotTesting + +extension Snapshotting where Value == (any HTML), Format == String { + public static var html: Snapshotting { + var snapshotting = SimplySnapshotting.lines + .pullback { (html: any HTML) in html.renderFormatted() } + + snapshotting.pathExtension = "html" + return snapshotting + } +} + +extension Snapshotting where Value == String, Format == String { + public static var html: Snapshotting { + var snapshotting = SimplySnapshotting.lines + .pullback { $0 } + + snapshotting.pathExtension = "html" + return snapshotting + } +} diff --git a/Sources/ManualDCore/Project.swift b/Sources/ManualDCore/Project.swift index 548ef39..5ef9d36 100644 --- a/Sources/ManualDCore/Project.swift +++ b/Sources/ManualDCore/Project.swift @@ -140,16 +140,22 @@ extension Project { #if DEBUG extension Project { - public static let mock = Self( - id: UUID(0), - name: "Testy McTestface", - streetAddress: "1234 Sesame Street", - city: "Monroe", - state: "OH", - zipCode: "55555", - createdAt: Date(), - updatedAt: Date() - ) + + public static var mock: Self { + @Dependency(\.uuid) var uuid + @Dependency(\.date.now) var now + + return .init( + id: uuid(), + name: "Testy McTestface", + streetAddress: "1234 Sesame Street", + city: "Monroe", + state: "OH", + zipCode: "55555", + createdAt: now, + updatedAt: now + ) + } } #endif diff --git a/Sources/ManualDCore/User.swift b/Sources/ManualDCore/User.swift index 2cf9685..f0869a8 100644 --- a/Sources/ManualDCore/User.swift +++ b/Sources/ManualDCore/User.swift @@ -65,3 +65,15 @@ extension User { } } } + +#if DEBUG + + extension User { + public static var mock: Self { + @Dependency(\.uuid) var uuid + @Dependency(\.date.now) var now + return .init(id: uuid(), email: "testy@example.com", createdAt: now, updatedAt: now) + } + } + +#endif diff --git a/Sources/ManualDCore/UserProfile.swift b/Sources/ManualDCore/UserProfile.swift index 84baed3..cae86a2 100644 --- a/Sources/ManualDCore/UserProfile.swift +++ b/Sources/ManualDCore/UserProfile.swift @@ -1,3 +1,4 @@ +import Dependencies import Foundation extension User { @@ -113,3 +114,27 @@ extension User.Profile { } } } + +#if DEBUG + extension User.Profile { + public static func mock(userID: User.ID) -> Self { + @Dependency(\.uuid) var uuid + @Dependency(\.date.now) var now + + return .init( + id: uuid(), + userID: userID, + firstName: "Testy", + lastName: "McTestface", + companyName: "Acme Co.", + streetAddress: "1234 Sesame St", + city: "Monroe", + state: "OH", + zipCode: "55555", + createdAt: now, + updatedAt: now + ) + + } + } +#endif diff --git a/Tests/ManualDClientTests/ManualDClientTests.swift b/Tests/ManualDClientTests/ManualDClientTests.swift index b2d02d4..ce5d00f 100644 --- a/Tests/ManualDClientTests/ManualDClientTests.swift +++ b/Tests/ManualDClientTests/ManualDClientTests.swift @@ -33,31 +33,31 @@ struct ManualDClientTests { #expect(response.velocity == 329) } - @Test - func frictionRate() async throws { - let response = try await manualD.frictionRate( - .init( - externalStaticPressure: 0.5, - componentPressureLosses: .mock, - totalEffectiveLength: 185 - ) - ) - #expect(numberFormatter.string(for: response.availableStaticPressure) == "0.11") - #expect(numberFormatter.string(for: response.frictionRate) == "0.06") - } + // @Test + // func frictionRate() async throws { + // let response = try await manualD.frictionRate( + // .init( + // externalStaticPressure: 0.5, + // componentPressureLosses: .mock, + // totalEffectiveLength: 185 + // ) + // ) + // #expect(numberFormatter.string(for: response.availableStaticPressure) == "0.11") + // #expect(numberFormatter.string(for: response.frictionRate) == "0.06") + // } - @Test - func frictionRateFails() async throws { - await #expect(throws: ManualDError.self) { - _ = try await manualD.frictionRate( - .init( - externalStaticPressure: 0.5, - componentPressureLosses: .mock, - totalEffectiveLength: 0 - ) - ) - } - } + // @Test + // func frictionRateFails() async throws { + // await #expect(throws: ManualDError.self) { + // _ = try await manualD.frictionRate( + // .init( + // externalStaticPressure: 0.5, + // componentPressureLosses: .mock, + // totalEffectiveLength: 0 + // ) + // ) + // } + // } @Test func totalEffectiveLength() async throws { diff --git a/Tests/ViewControllerTests/ViewControllerTests.swift b/Tests/ViewControllerTests/ViewControllerTests.swift new file mode 100644 index 0000000..6626c23 --- /dev/null +++ b/Tests/ViewControllerTests/ViewControllerTests.swift @@ -0,0 +1,208 @@ +import AuthClient +import DatabaseClient +import Dependencies +import Foundation +import HTMLSnapshotTesting +import Logging +import ManualDClient +import ManualDCore +import ProjectClient +import SnapshotTesting +import Testing +import ViewController + +@Suite(.snapshots(record: .missing)) +struct ViewControllerTests { + + @Test + func login() async throws { + try await withDependencies { + $0.viewController = .liveValue + $0.authClient = .failing + } operation: { + @Dependency(\.viewController) var viewController + + let login = try await viewController.view(.test(.login(.index()))) + assertSnapshot(of: login, as: .html) + } + } + + @Test + func signup() async throws { + try await withDependencies { + $0.viewController = .liveValue + $0.authClient = .failing + } operation: { + @Dependency(\.viewController) var viewController + + let signup = try await viewController.view(.test(.login(.index()))) + assertSnapshot(of: signup, as: .html) + } + } + + @Test + func userProfile() async throws { + try await withDefaultDependencies { + @Dependency(\.viewController) var viewController + let html = try await viewController.view(.test(.user(.profile(.index)))) + assertSnapshot(of: html, as: .html) + } + } + + @Test + func projectIndex() async throws { + let project = withDependencies { + $0.uuid = .incrementing + $0.date = .constant(.mock) + } operation: { + Project.mock + } + + try await withDefaultDependencies { + $0.database.projects.fetch = { _, _ in + .init(items: [project], metadata: .init(page: 1, per: 25, total: 1)) + } + } operation: { + @Dependency(\.viewController) var viewController + let html = try await viewController.view(.test(.project(.index))) + assertSnapshot(of: html, as: .html) + } + } + + @Test + func projectDetail() async throws { + + let ( + project, + rooms, + equipment, + tels, + componentLosses, + trunks + ) = withDependencies { + $0.uuid = .incrementing + $0.date = .constant(.mock) + } operation: { + let project = Project.mock + let rooms = Room.mock(projectID: project.id) + let equipment = EquipmentInfo.mock(projectID: project.id) + let tels = EffectiveLength.mock(projectID: project.id) + let componentLosses = ComponentPressureLoss.mock(projectID: project.id) + let trunks = TrunkSize.mock(projectID: project.id, rooms: rooms) + + return ( + project, + rooms, + equipment, + tels, + componentLosses, + trunks + ) + } + + try await withDefaultDependencies { + $0.database.projects.get = { _ in project } + $0.database.projects.getCompletedSteps = { _ in + .init(equipmentInfo: true, rooms: true, equivalentLength: true, frictionRate: true) + } + $0.database.projects.getSensibleHeatRatio = { _ in 0.83 } + $0.database.rooms.fetch = { _ in rooms } + $0.database.equipment.fetch = { _ in equipment } + $0.database.effectiveLength.fetch = { _ in tels } + $0.database.effectiveLength.fetchMax = { _ in + .init(supply: tels.first, return: tels.last) + } + $0.database.componentLoss.fetch = { _ in componentLosses } + $0.projectClient.calculateDuctSizes = { _ in + .mock(equipmentInfo: equipment, rooms: rooms, trunks: trunks) + } + } operation: { + @Dependency(\.viewController) var viewController + + var html = try await viewController.view(.test(.project(.detail(project.id, .index)))) + assertSnapshot(of: html, as: .html) + + html = try await viewController.view(.test(.project(.detail(project.id, .rooms(.index))))) + assertSnapshot(of: html, as: .html) + + html = try await viewController.view(.test(.project(.detail(project.id, .equipment(.index))))) + assertSnapshot(of: html, as: .html) + + html = try await viewController.view( + .test(.project(.detail(project.id, .equivalentLength(.index))))) + assertSnapshot(of: html, as: .html) + + html = try await viewController.view( + .test(.project(.detail(project.id, .frictionRate(.index))))) + assertSnapshot(of: html, as: .html) + + html = try await viewController.view( + .test(.project(.detail(project.id, .ductSizing(.index))))) + assertSnapshot(of: html, as: .html) + } + } + + func createUserDependencies() -> (User, User.Profile) { + withDependencies { + $0.uuid = .incrementing + $0.date = .constant(.mock) + } operation: { + let user = User.mock + let profile = User.Profile.mock(userID: user.id) + return (user, profile) + } + } + + @discardableResult + func withDefaultDependencies( + isolation: isolated (any Actor)? = #isolation, + _ updateDependencies: (inout DependencyValues) async throws -> Void = { _ in }, + operation: () async throws -> R + ) async rethrows -> R { + let (user, profile) = createUserDependencies() + + return try await withDependencies { + $0.viewController = .liveValue + $0.authClient.currentUser = { user } + $0.database.userProfile.fetch = { _ in profile } + $0.manualD = .liveValue + try await updateDependencies(&$0) + } operation: { + try await operation() + } + } +} + +extension Date { + static let mock = Self(timeIntervalSince1970: 1_234_567_890) +} + +extension ViewController.Request { + + static func test( + _ route: SiteRoute.View, + isHtmxRequest: Bool = false, + logger: Logger = .init(label: "ViewControllerTests") + ) -> Self { + .init(route: route, isHtmxRequest: isHtmxRequest, logger: logger) + } +} + +extension AuthClient { + static let failing = Self( + createAndLogin: { _ in + throw TestError() + }, + currentUser: { + throw TestError() + }, + login: { _ in + throw TestError() + }, + logout: { + throw TestError() + } + ) +} + +struct TestError: Error {} diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/login.1.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/login.1.html new file mode 100644 index 0000000..c044deb --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/login.1.html @@ -0,0 +1,79 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.1.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.1.html new file mode 100644 index 0000000..4a98913 --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.1.html @@ -0,0 +1,251 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+

Project

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Name +
Testy McTestface
+
Street Address +
1234 Sesame Street
+
City +
Monroe
+
State +
OH
+
Zip +
55555
+
+ + + +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.2.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.2.html new file mode 100644 index 0000000..e0d851c --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.2.html @@ -0,0 +1,593 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+
+
+

Room Loads

+
+
+
+ +
+
+
+ Heating Total +
42,255
+
+
+ Cooling Total +
26,835
+
+
+ Cooling Sensible +
22,273
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name +
Heating Load
+
+
Cooling Total
+
+
Cooling Sensible
+
+
Register Count
+
+
+
+ +
+
+
Bed-1 +
3,913
+
+
2,472
+
+
2,052
+
+
1
+
+
+
+
+ +
+
+ +
+
+
+ + + +
Entry +
8,284
+
+
2,916
+
+
2,420
+
+
2
+
+
+
+
+ +
+
+ +
+
+
+ + + +
Family Room +
9,785
+
+
7,446
+
+
6,180
+
+
3
+
+
+
+
+ +
+
+ +
+
+
+ + + +
Kitchen +
4,518
+
+
5,096
+
+
4,230
+
+
2
+
+
+
+
+ +
+
+ +
+
+
+ + + +
Living Room +
7,553
+
+
6,829
+
+
5,668
+
+
2
+
+
+
+
+ +
+
+ +
+
+
+ + + +
Master +
8,202
+
+
2,076
+
+
1,723
+
+
2
+
+
+
+
+ +
+
+ +
+
+
+ + + +
+ + + +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.3.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.3.html new file mode 100644 index 0000000..7ba7bc4 --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.3.html @@ -0,0 +1,236 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+

Equipment Details

+
+ +
+
+ + + + + + + + + + + + + + + +
Static Pressure +
0.5
+
Heating CFM +
900
+
Cooling CFM +
1,000
+
+ + + +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.4.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.4.html new file mode 100644 index 0000000..694d334 --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.4.html @@ -0,0 +1,366 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+

Equivalent Lengths

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameStraight Lengths +
+
Groups
+
Group
+
T.E.L.
+
Quantity
+
+
+
T.E.L.
+
+
supply
+
Supply - 1 +
1025
+
+
+ 1-a +
20
+
1
+ 2-b +
30
+
1
+ 3-a +
10
+
1
+ 12-a +
10
+
1
+
+
+
+
105
+
+
+
+ +
+
+ +
+
+
+
+ + + +
+
return
+
Return - 1 +
10205
+
+
+ 5-a +
10
+
1
+ 6-a +
15
+
1
+ 7-a +
20
+
1
+
+
+
+
80
+
+
+
+ +
+
+ +
+
+
+
+ + + +
+
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.5.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.5.html new file mode 100644 index 0000000..e0ce9c0 --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.5.html @@ -0,0 +1,442 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+
+

Friction Rate

+
+
+ Friction Rate Design Value +
0.06
+
+
+ Available Static Pressure +
0.11
+
+
+ Component Pressure Losses +
0.39
+
+
+
+ + + + +
+
+
+
+
+

Component Pressure Losses

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameValue
evaporator-coil0.2 +
+
+ +
+
+ +
+
+ + + +
filter0.1 +
+
+ +
+
+ +
+
+ + + +
supply-outlet0.03 +
+
+ +
+
+ +
+
+ + + +
return-grille0.03 +
+
+ +
+
+ +
+
+ + + +
balancing-damper0.03 +
+
+ +
+
+ +
+
+ + + +
+
+ + + +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.6.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.6.html new file mode 100644 index 0000000..a579ecf --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectDetail.6.html @@ -0,0 +1,1559 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+
+

Duct Sizes

+ +
+ PDF +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameBTUCFMVelocitySize
Bed-1 +
Heating3,913Cooling2,472
+
+
+ Design +
+
92
+
+ Heating +
83
+ Cooling +
92
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Entry +
Heating4,142Cooling1,458
+
+
+ Design +
+
88
+
+ Heating +
88
+ Cooling +
54
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Entry +
Heating4,142Cooling1,458
+
+
+ Design +
+
88
+
+ Heating +
88
+ Cooling +
54
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Family Room +
Heating3,262Cooling2,482
+
+
+ Design +
+
92
+
+ Heating +
69
+ Cooling +
92
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Family Room +
Heating3,262Cooling2,482
+
+
+ Design +
+
92
+
+ Heating +
69
+ Cooling +
92
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Family Room +
Heating3,262Cooling2,482
+
+
+ Design +
+
92
+
+ Heating +
69
+ Cooling +
92
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Kitchen +
Heating2,259Cooling2,548
+
+
+ Design +
+
95
+
+ Heating +
48
+ Cooling +
95
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Kitchen +
Heating2,259Cooling2,548
+
+
+ Design +
+
95
+
+ Heating +
48
+ Cooling +
95
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Living Room +
Heating3,776Cooling3,414
+
+
+ Design +
+
127
+
+ Heating +
80
+ Cooling +
127
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Living Room +
Heating3,776Cooling3,414
+
+
+ Design +
+
127
+
+ Heating +
80
+ Cooling +
127
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Master +
Heating4,101Cooling1,038
+
+
+ Design +
+
87
+
+ Heating +
87
+ Cooling +
39
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
Master +
Heating4,101Cooling1,038
+
+
+ Design +
+
87
+
+ Heating +
87
+ Cooling +
39
+
+
489 +
+
Calculated
+
+
7
+
+
+
Final
+
+
8
+
+
+
Flex
+
+
8
+
+
+
Rectangular
+
+
+
+
+ +
+
+
+ + + +
+
+
+

Trunk / Runout Sizes

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Name / TypeAssociated SuppliesDsn CFMVelocitySize
+
+
supply
+
+
+
+
Bed-1
+
Entry
+
Entry
+
Family Room
+
Family Room
+
Family Room
+
Kitchen
+
Kitchen
+
Living Room
+
Living Room
+
Master
+
Master
+
+
1,000987 +
+
Calculated
+
+
18
+
+
+
Final
+
+
20
+
+
+
Flex
+
+
20
+
+
+
Rectangular
+
+
+
+ +
+
+
+ + + +
+
+
return
+
+
+
+
Bed-1
+
Entry
+
Entry
+
Family Room
+
Family Room
+
Family Room
+
Kitchen
+
Kitchen
+
Living Room
+
Living Room
+
Master
+
Master
+
+
1,000987 +
+
Calculated
+
+
18
+
+
+
Final
+
+
20
+
+
+
Flex
+
+
20
+
+
+
Rectangular
+
+
+
+ +
+
+
+ + + +
+ + + +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectIndex.1.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectIndex.1.html new file mode 100644 index 0000000..8f6b58a --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/projectIndex.1.html @@ -0,0 +1,111 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+

Projects

+
+ +
+
+ + + + + + + + + + + + + + + + + +
DateNameAddress
02/13/2009Testy McTestface1234 Sesame Street +
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/signup.1.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/signup.1.html new file mode 100644 index 0000000..c044deb --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/signup.1.html @@ -0,0 +1,79 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + \ No newline at end of file diff --git a/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/userProfile.1.html b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/userProfile.1.html new file mode 100644 index 0000000..6a7df06 --- /dev/null +++ b/Tests/ViewControllerTests/__Snapshots__/ViewControllerTests/userProfile.1.html @@ -0,0 +1,159 @@ + + + + Duct Calc + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+

Account

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTesty McTestface
CompanyAcme Co.
Street Address1234 Sesame St
CityMonroe
StateOH
Zip Code55555
Theme
+ + + +
+
+
+
+ +
+
+ + \ No newline at end of file