• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kiva / ui / 27433165934
85%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2026 05:56PM UTC
Jobs 1
Files 408
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2026 05:51PM UTC coverage: 84.632% (-0.01%) from 84.644%
27433165934

push

github

web-flow
feat: render optional tip section in admin reward LC checkout variant b (MP-2840) (#6977)

* feat: render optional tip section in admin reward LC checkout variant b

Wires the `stop_hiding_tip_campaign` experiment (MP-2852) into the LC
checkout UI. When an eligible Admin Reward lender is bucketed into
variant `b`, the frontend injects an `isTip: true` Donation into the
basket so the existing `DonationItem` renders the standard tip section.
For variant `a` (control), `reward_credit` LC checkouts continue to
suppress the tip exactly as today.

Ticket: https://kiva.atlassian.net/browse/MP-2840
Parent epic: MP-2829 (Stop hiding tip - LC Campaigns)
Depends on: MP-2839 (helper, #6967), MP-2852 (bucketing, #6970)
Followed by: MP-2841 (Playwright)

Why the injection is a frontend mutation rather than a `v-if`:
Tip suppression for `reward_credit` LC checkouts is structural — the
backend simply omits the `isTip: true` Donation from
`shop.basket.items.values`. `BasketItemsList` renders whatever
donations are in the basket; there is no UI-side gate to flip. To
"show the tip" the frontend must put a tip Donation into the basket.

Changes in src/pages/Checkout/CheckoutPage.vue:

- Import `setDonationAmount` from `#src/util/basketUtils` — the
  canonical wrapper around the `updateDonation` mutation that
  `DonationItem` itself uses. Backend upserts on `isTip` within the
  basket, so this both creates the donation when absent and updates
  it when present.

- Add `ensureTipDonationExists()` method:
    * Short-circuits on `emptyBasket` to avoid a race with the
      `emptyBasket` watcher (see below).
    * Computes `donationAmount` as
      `TIP_PERCENTAGE * (loanReservationTotal + kivaCardTotal)`,
      quantized to 2 decimals so the equality check can never miss
      due to float representation.
    * Reads any existing tip from `this.donations` and skips the
      mutation when the existing price is non-zero (preserves a
      user-entered tip) OR already equals ... (continued)

5242 of 5759 branches covered (91.02%)

Branch coverage included in aggregate %.

26 of 38 new or added lines in 1 file covered. (68.42%)

41282 of 49213 relevant lines covered (83.88%)

35.81 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
46.64
1.05% src/pages/Checkout/CheckoutPage.vue
Jobs
ID Job ID Ran Files Coverage
1 27433165934.1 12 Jun 2026 05:56PM UTC 408
84.63
GitHub Action Run
Source Files on build 27433165934
  • Tree
  • List 408
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27433165934
  • 04056938 on github
  • Prev Build on main (#27423976021)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc