mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-09-15 12:42:21 +02:00
17 lines
609 B
Python
17 lines
609 B
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_search_popup_freezes_offset_before_mobile_keyboard_focus() -> None:
|
|
source = (ROOT / "static/js/search-chat.js").read_text(encoding="utf-8")
|
|
css = (ROOT / "static/style.css").read_text(encoding="utf-8")
|
|
|
|
set_offset = source.index("--search-overlay-top")
|
|
show_overlay = source.index("overlay.classList.remove('hidden')", set_offset)
|
|
focus_input = source.index("input.focus()", show_overlay)
|
|
|
|
assert set_offset < show_overlay < focus_input
|
|
assert "padding-top: var(--search-overlay-top, 15vh);" in css
|