Make UI mobile responsive #29
This commit is contained in:
@@ -51,6 +51,30 @@ def test_index_renders_settings_dialog(tmp_path, monkeypatch):
|
||||
assert "Test Sonarr connection" in response.text
|
||||
|
||||
|
||||
def test_index_renders_responsive_table_wrappers(tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("IMPORTARR_STATE_PATH", str(tmp_path / "state.db"))
|
||||
import importarr.main as main
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
response = TestClient(main.app).get("/")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert 'class="table-scroll"' in response.text
|
||||
assert '<meta name="viewport" content="width=device-width, initial-scale=1">' in response.text
|
||||
|
||||
|
||||
def test_stylesheet_includes_mobile_responsive_rules():
|
||||
from pathlib import Path
|
||||
|
||||
css = Path("importarr/static/importarr.css").read_text()
|
||||
|
||||
assert "@media (max-width:640px)" in css
|
||||
assert ".table-scroll" in css
|
||||
assert "overflow-x:auto" in css
|
||||
assert "flex-direction:column" in css
|
||||
|
||||
|
||||
def test_settings_endpoint_persists_arr_connection_values(tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("IMPORTARR_STATE_PATH", str(tmp_path / "state.db"))
|
||||
import importarr.main as main
|
||||
|
||||
Reference in New Issue
Block a user