chore: drop legacy #id_tithe_token_shop block from Balances applet — Chunk 5 (final) of [[project-wallet-shop-expansion]]. The inline 1 Tithe Token +144 Writs $1.00 / 5 Tithe Tokens +750 Writs $4.00 token-bundle HTML in _applet-wallet-balances.html was display-only (no purchase wiring was ever attached) + has been fully superseded by the dedicated Shop applet shipped in Chunks 2-4. Per the locked decision in the scope doc, Balances is now read-only — writs + esteem totals only — and the Shop is the canonical purchase surface. **Removed**: 8 lines of <div id="id_tithe_token_shop"> w. 2 .token-bundle children. **Replaced with** a {% comment %} pointer noting the move so the next archeologist looking at the Balances HTML doesn't reinvent the wheel. **Dropped tests**: WalletViewTest.test_wallet_page_shows_tithe_token_shop + :test_tithe_token_shop_shows_bundle ITs + the legacy test_user_can_purchase_tithe_token_bundle FT — all asserted the now-removed selector. Replaced w. a comment pointing to the 3 new shop FTs (test_shop_applet_renders_seeded_items_with_icons_and_badges, test_shop_buy_click_opens_guard_portal_with_purchase_prompt, test_shop_band_already_owned_shows_disabled_buy_btn) + the model + view ITs in test_shop_models.py + test_shop_views.py. 1206 IT/UT (was 1208 — 2 stale ITs gone) + 8 wallet FTs (was 9 — 1 stale FT gone) green
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,12 +40,11 @@ class WalletViewTest(TestCase):
|
||||
def test_wallet_page_shows_stripe_payment_element(self):
|
||||
[_] = self.parsed.cssselect("#id_stripe_payment_element")
|
||||
|
||||
def test_wallet_page_shows_tithe_token_shop(self):
|
||||
[_] = self.parsed.cssselect("#id_tithe_token_shop")
|
||||
|
||||
def test_tithe_token_shop_shows_bundle(self):
|
||||
bundles = self.parsed.cssselect("#id_tithe_token_shop .token-bundle")
|
||||
self.assertGreater(len(bundles), 0)
|
||||
# Note: the legacy `#id_tithe_token_shop` HTML in Balances was
|
||||
# superseded by the dedicated Shop applet in Chunk 5 of
|
||||
# [[project-wallet-shop-expansion]]. Shop-applet coverage lives in
|
||||
# `WalletTokensAppletAllTrinketsVisibleTest` below + `test_shop_models.py`
|
||||
# + `test_shop_views.py`.
|
||||
|
||||
|
||||
class WalletTokensAppletAllTrinketsVisibleTest(TestCase):
|
||||
|
||||
@@ -348,20 +348,13 @@ class WalletDisplayTest(FunctionalTest):
|
||||
self.assertIn("Already owned", tt_html)
|
||||
|
||||
|
||||
def test_user_can_purchase_tithe_token_bundle(self):
|
||||
# 1. Log in, navigate to wallet page
|
||||
self.create_pre_authenticated_session("capman@test.io")
|
||||
self.browser.get(self.live_server_url + "/dashboard/wallet/")
|
||||
# 2. Assert Tithe Token purchase section present
|
||||
self.wait_for(
|
||||
lambda: self.browser.find_element(By.ID, "id_tithe_token_shop")
|
||||
)
|
||||
# 3. Assert min. +1 bundle option is visible
|
||||
bundle = self.browser.find_element(
|
||||
By.CSS_SELECTOR, "#id_tithe_token_shop .token-bundle"
|
||||
)
|
||||
# 4. Assert ea. bundle shows token count & writ bonus placeholder
|
||||
self.assertIn("Tithe Token", bundle.text)
|
||||
self.assertIn("Writ", bundle.text)
|
||||
# 5. (Placeholder) Purchase flow via Stripe not driven in this FT:
|
||||
# Full charge assertion deferred until Stripe webhook handling implemented
|
||||
# Legacy `test_user_can_purchase_tithe_token_bundle` FT (asserting
|
||||
# `#id_tithe_token_shop` inside Balances) was removed in Chunk 5 of
|
||||
# [[project-wallet-shop-expansion]] — the tithe purchase surface
|
||||
# moved to the dedicated Shop applet. Coverage now lives in:
|
||||
# - `test_shop_applet_renders_seeded_items_with_icons_and_badges`
|
||||
# (tile + icon + badge + price)
|
||||
# - `test_shop_buy_click_opens_guard_portal_with_purchase_prompt`
|
||||
# (BUY → guard portal → NVM dismisses)
|
||||
# - `test_shop_band_already_owned_shows_disabled_buy_btn`
|
||||
# (max_owned cap renders BUY as `.btn-disabled` w. microtext)
|
||||
|
||||
@@ -2,19 +2,13 @@
|
||||
id="id_wallet_balances"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
{% comment %}
|
||||
Tithe purchase UI was moved out to the dedicated Shop applet in
|
||||
Chunk 5 of [[project-wallet-shop-expansion]] — the Shop is the
|
||||
canonical purchase surface; Balances is read-only (writs + esteem
|
||||
totals).
|
||||
{% endcomment %}
|
||||
<h2>Balances</h2>
|
||||
<div><i class="fa-solid fa-ticket"></i>: <span id="id_writs_balance">{{ wallet.writs }}</span></div>
|
||||
<div>Esteem: <span id="id_esteem_balance">{{ wallet.esteem }}</span></div>
|
||||
<div id="id_tithe_token_shop">
|
||||
<div class="token-bundle" data-qty="1" data-price-cents="100">
|
||||
<span class="bundle-qty">1 Tithe Token</span>
|
||||
<span class="bundle-writs">+144 Writs</span>
|
||||
<span class="bundle-price">$1.00</span>
|
||||
</div>
|
||||
<div class="token-bundle" data-qty="5" data-price-cents="400">
|
||||
<span class="bundle-qty">5 Tithe Tokens</span>
|
||||
<span class="bundle-writs">+750 Writs</span>
|
||||
<span class="bundle-price">$4.00</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user