mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-20 13:52:24 +02:00
Squash Odysseus development history
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_mobile_keyboard_fades_welcome_without_moving_it() -> None:
|
||||
css = (ROOT / "static/style.css").read_text(encoding="utf-8")
|
||||
init_js = (ROOT / "static/js/init.js").read_text(encoding="utf-8")
|
||||
|
||||
kb_rule = css.split("#welcome-screen.kb-hidden {", 1)[1].split("}", 1)[0]
|
||||
focus_rule = css.split(
|
||||
".chat-container.welcome-active:has(.chat-input-bar:focus-within) #welcome-screen,",
|
||||
1,
|
||||
)[1].split("}", 1)[0]
|
||||
|
||||
assert "transform: translate(-50%, -50%);" in kb_rule
|
||||
assert "scale(" not in kb_rule
|
||||
assert "transform: translate(-50%, -50%);" in focus_rule
|
||||
assert "translate(-50%, -58%)" not in focus_rule
|
||||
assert "welcome.style.transform" not in init_js
|
||||
|
||||
|
||||
def test_nobody_label_collapses_by_width_not_keyboard_height() -> None:
|
||||
css = (ROOT / "static/style.css").read_text(encoding="utf-8")
|
||||
label_rule = css.rsplit(".incognito-btn .incognito-label {", 1)[0]
|
||||
media_header = label_rule.rsplit("@media", 1)[1].split("{", 1)[0]
|
||||
|
||||
assert "max-width: 340px" in media_header
|
||||
assert "max-height" not in media_header
|
||||
Reference in New Issue
Block a user