From d28cf7b53805ac8691b00053c1e3ef5192ebb385 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Fri, 22 May 2026 01:23:07 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20drop=20legacy=20`#id=5Ftithe=5Ftoken?= =?UTF-8?q?=5Fshop`=20block=20from=20Balances=20applet=20=E2=80=94=20Chunk?= =?UTF-8?q?=205=20(final)=20of=20[[project-wallet-shop-expansion]].=20The?= =?UTF-8?q?=20inline=20`1=20Tithe=20Token=20+144=20Writs=20$1.00`=20/=20`5?= =?UTF-8?q?=20Tithe=20Tokens=20+750=20Writs=20$4.00`=20token-bundle=20HTML?= =?UTF-8?q?=20in=20`=5Fapplet-wallet-balances.html`=20was=20display-only?= =?UTF-8?q?=20(no=20purchase=20wiring=20was=20ever=20attached)=20+=20has?= =?UTF-8?q?=20been=20fully=20superseded=20by=20the=20dedicated=20Shop=20ap?= =?UTF-8?q?plet=20shipped=20in=20Chunks=202-4.=20Per=20the=20locked=20deci?= =?UTF-8?q?sion=20in=20the=20scope=20doc,=20Balances=20is=20now=20read-onl?= =?UTF-8?q?y=20=E2=80=94=20writs=20+=20esteem=20totals=20only=20=E2=80=94?= =?UTF-8?q?=20and=20the=20Shop=20is=20the=20canonical=20purchase=20surface?= =?UTF-8?q?.=20**Removed**:=208=20lines=20of=20``=20w.=202=20`.token-bundle`=20children.=20**Repl?= =?UTF-8?q?aced=20with**=20a=20`{%=20comment=20%}`=20pointer=20noting=20th?= =?UTF-8?q?e=20move=20so=20the=20next=20archeologist=20looking=20at=20the?= =?UTF-8?q?=20Balances=20HTML=20doesn't=20reinvent=20the=20wheel.=20**Drop?= =?UTF-8?q?ped=20tests**:=20`WalletViewTest.test=5Fwallet=5Fpage=5Fshows?= =?UTF-8?q?=5Ftithe=5Ftoken=5Fshop`=20+=20`:test=5Ftithe=5Ftoken=5Fshop=5F?= =?UTF-8?q?shows=5Fbundle`=20ITs=20+=20the=20legacy=20`test=5Fuser=5Fcan?= =?UTF-8?q?=5Fpurchase=5Ftithe=5Ftoken=5Fbundle`=20FT=20=E2=80=94=20all=20?= =?UTF-8?q?asserted=20the=20now-removed=20selector.=20Replaced=20w.=20a=20?= =?UTF-8?q?comment=20pointing=20to=20the=203=20new=20shop=20FTs=20(`test?= =?UTF-8?q?=5Fshop=5Fapplet=5Frenders=5Fseeded=5Fitems=5Fwith=5Ficons=5Fan?= =?UTF-8?q?d=5Fbadges`,=20`test=5Fshop=5Fbuy=5Fclick=5Fopens=5Fguard=5Fpor?= =?UTF-8?q?tal=5Fwith=5Fpurchase=5Fprompt`,=20`test=5Fshop=5Fband=5Falread?= =?UTF-8?q?y=5Fowned=5Fshows=5Fdisabled=5Fbuy=5Fbtn`)=20+=20the=20model=20?= =?UTF-8?q?+=20view=20ITs=20in=20`test=5Fshop=5Fmodels.py`=20+=20`test=5Fs?= =?UTF-8?q?hop=5Fviews.py`.=201206=20IT/UT=20(was=201208=20=E2=80=94=202?= =?UTF-8?q?=20stale=20ITs=20gone)=20+=208=20wallet=20FTs=20(was=209=20?= =?UTF-8?q?=E2=80=94=201=20stale=20FT=20gone)=20green?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- .../tests/integrated/test_wallet_views.py | 11 ++++---- src/functional_tests/test_dash_wallet.py | 27 +++++++------------ .../_partials/_applet-wallet-balances.html | 18 +++++-------- 3 files changed, 21 insertions(+), 35 deletions(-) diff --git a/src/apps/dashboard/tests/integrated/test_wallet_views.py b/src/apps/dashboard/tests/integrated/test_wallet_views.py index 81610a5..46a0552 100644 --- a/src/apps/dashboard/tests/integrated/test_wallet_views.py +++ b/src/apps/dashboard/tests/integrated/test_wallet_views.py @@ -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): diff --git a/src/functional_tests/test_dash_wallet.py b/src/functional_tests/test_dash_wallet.py index 9c73055..1edbbc6 100644 --- a/src/functional_tests/test_dash_wallet.py +++ b/src/functional_tests/test_dash_wallet.py @@ -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) diff --git a/src/templates/apps/wallet/_partials/_applet-wallet-balances.html b/src/templates/apps/wallet/_partials/_applet-wallet-balances.html index fa1eba9..dd20121 100644 --- a/src/templates/apps/wallet/_partials/_applet-wallet-balances.html +++ b/src/templates/apps/wallet/_partials/_applet-wallet-balances.html @@ -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 %}

Balances

: {{ wallet.writs }}
Esteem: {{ wallet.esteem }}
-
-
- 1 Tithe Token - +144 Writs - $1.00 -
-
- 5 Tithe Tokens - +750 Writs - $4.00 -
-