Files
bitvid/verification/verify_search_fab.py
T
google-labs-jules[bot] c675aa0685 fix(ui): align mobile search icon color with upload button
Updates the mobile search FAB (#mobileSearchFab) to use `bg-accent-strong` instead of `bg-critical`.
This ensures the icon color matches the "Upload Video" button, respecting the active theme override (which sets the accent color to red).

Verified visually using a Playwright script and screenshot validation.
Verified by running `npm run build:css` and `npm run test:unit`.
2026-01-19 02:47:31 +00:00

39 lines
1.5 KiB
Python

from playwright.sync_api import sync_playwright
def verify_mobile_search_fab():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
# Emulate a mobile device to ensure the FAB is visible
# iPhone 12 Pro dimensions: 390x844
context = browser.new_context(viewport={'width': 390, 'height': 844})
page = context.new_page()
try:
# Navigate to the local server
page.goto("http://localhost:8000/index.html")
# Locate the mobile search FAB
fab = page.locator("#mobileSearchFab")
# Wait for it to be visible (it has a hidden class removed by JS logic or media query)
# The CSS shows md:hidden. We are on mobile viewport, so it should be visible.
# However, JS logic might also toggle it.
# Looking at index.js: "mobileSearchFab.classList.remove('hidden')" logic exists.
# But let's check its visibility.
# Check the computed style background color
bg_color = fab.evaluate("element => getComputedStyle(element).backgroundColor")
print(f"Computed background color: {bg_color}")
# Take a screenshot of the FAB
fab.screenshot(path="verification/mobile_search_fab.png")
print("Screenshot saved to verification/mobile_search_fab.png")
except Exception as e:
print(f"Error: {e}")
finally:
browser.close()
if __name__ == "__main__":
verify_mobile_search_fab()