Skip to content

Commit

Permalink
Added snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Jul 17, 2023
1 parent 8affe26 commit e07d450
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tests/RevenueCatUITests/PaywallViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ class PaywallViewTests: TestCase {
view.snapshot(size: Self.size)
}

func testDarkMode() {
let offering = TestData.offeringWithIntroOffer

let view = PaywallView(offering: offering,
paywall: offering.paywallWithLocalImage,
introEligibility: Self.ineligibleChecker,
purchaseHandler: Self.purchaseHandler)

view
.environment(\.colorScheme, .dark)
.snapshot(size: Self.size)
}

private static let eligibleChecker: TrialOrIntroEligibilityChecker = .producing(eligibility: .eligible)
private static let ineligibleChecker: TrialOrIntroEligibilityChecker = .producing(eligibility: .ineligible)
private static let purchaseHandler: PurchaseHandler = .mock()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e07d450

Please sign in to comment.