Skip to content

Commit

Permalink
MBL-1331: Update Thanks page copy for late pledges
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-at-kickstarter committed Apr 15, 2024
1 parent 7f49ee1 commit be85c8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Library/ViewModels/ThanksViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public final class ThanksViewModel: ThanksViewModelType, ThanksViewModelInputs,

self.backedProjectText = self.configureWithDataProperty.signal
.skipNil()
.map { project, _, _, _ in
.map { project, _, _, pledgeTotal in

let string: String

Expand All @@ -95,8 +95,11 @@ public final class ThanksViewModel: ThanksViewModelType, ThanksViewModelInputs,
let isInPostCampaignPledging = featurePostCampaignPledgeEnabled() && project
.isInPostCampaignPledgingPhase

let totalString = Format.currency(pledgeTotal, country: project.country)

string = isInPostCampaignPledging
? ""
? Strings
.You_have_successfully_pledged_to_project_post_campaign_html_short(pledge_total: totalString)
: Strings.You_have_successfully_backed_project_html(project_name: project.name)

return string
Expand Down
5 changes: 4 additions & 1 deletion Library/ViewModels/ThanksViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ final class ThanksViewModelTests: TestCase {
self.vm.inputs.configure(with: self.thanksPageData(project: project, pledgeTotal: 127))
self.vm.inputs.viewDidLoad()

self.backedProjectText.assertValues([""])
self.backedProjectText
.assertValues(
["Your ¥127 pledge will help in bringing this project to life. Check your email for more details."]
)
}
}

Expand Down

0 comments on commit be85c8c

Please sign in to comment.