updated palette-classes ending in .*-light to switch the rgb values of their tooltip background-color attrs from black to white (better accessibility); changed 'monochrome-light' & its cognates to 'oblivion-light', since it's hardly monochrome at all anymore
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-21 23:57:05 -04:00
parent 3b905e0436
commit ffb374c81c
4 changed files with 31 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
from selenium.webdriver.common.by import By
from apps.lyric.models import User
from .base import FunctionalTest
@@ -8,3 +10,20 @@ class SiteThemeTest(FunctionalTest):
self.browser.get(self.live_server_url)
body = self.browser.find_element(By.TAG_NAME, "body")
self.assertIn("palette-default", body.get_attribute("class"))
class LightPaletteTest(FunctionalTest):
def test_light_palette_tooltip_uses_white_background(self):
user, _ = User.objects.get_or_create(email="light@example.com")
user.palette = "palette-oblivion-light"
user.save()
self.create_pre_authenticated_session("light@example.com")
self.browser.get(self.live_server_url + "/dashboard/wallet/")
body = self.browser.find_element(By.TAG_NAME, "body")
tooltip_bg = self.browser.execute_script(
"return getComputedStyle(arguments[0]).getPropertyValue('--tooltip-bg').trim()",
body,
)
self.assertEqual(tooltip_bg, "255, 255, 255")