Show midnight price change in page title

This commit is contained in:
2026-09-17 14:49:25 +02:00
parent b30637ee4e
commit b5bbde8acb
3 changed files with 51 additions and 6 deletions
+7 -1
View File
@@ -37,7 +37,12 @@ def test_home_updates_title_from_latest_price():
assert response.status_code == 200
assert "new MutationObserver(updateTitleFromPrice)" in response.text
assert "document.title = price + ' | BTC Price'" in response.text
assert "currentPrice - midnightPrice" in response.text
assert "document.title = price + ' | ' + formattedChange" in response.text
assert '<h1 class="text-3xl font-bold text-gray-900">BTC Price</h1>' in response.text
assert "page-title" not in response.text
assert "formatPriceChange(change)" in response.text
assert "midnight.setHours(0, 0, 0, 0)" in response.text
def test_price_fragment_exposes_formatted_price_for_title():
@@ -46,6 +51,7 @@ def test_price_fragment_exposes_formatted_price_for_title():
)
assert 'data-title-price="$67.432,10"' in html
assert 'data-price-value="67432.1"' in html
assert ">$67.432,10</p>" in html