v0.0.5
RustBox CI / rustbox (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-30 12:06:44 +01:00
1 parent 96a32ea8fb
commit a643e7e3ab
106 files changed
+2223 -4669

No files matched your search

+3 -3
View File
@@ -101,7 +101,7 @@ def test_modular_js_contract():
assert "translateScopedUiText" in app
assert "presetScaleUnlocked" in app
assert "positionToolbarMenu" in app
assert "progressToast" in app
assert "progressToast" not in app
assert "attachmentPreviewLimitBytes" in app
assert 'label: "Preview"' in app
assert "This attachment is too large for preview. Download it instead?" in app
@@ -119,7 +119,7 @@ def test_backend_skin_contract_and_version():
for value in ["rustbox", "roundcube-classic", "roundcube-larry", "roundcube-elastic", "clean", "gmail", "proton", "zoho", "outlook", "minimal", "graphite", "high-contrast", "fastmail", "apple-mail", "yahoo", "hey", "nord"]:
assert f'"{value}"' in db_source
cargo = (ROOT / "Cargo.toml").read_text()
assert 'version = "0.0.4"' in cargo
assert 'version = "0.0.5"' in cargo
config = (ROOT / "src/config.rs").read_text()
assert "pub default_theme: String" in config
assert '"system" | "dark" | "light"' in config
@@ -135,7 +135,7 @@ def test_backend_skin_contract_and_version():
def test_mobile_003_contract():
responsive = (ROOT / "src/web/css/60-responsive.css").read_text()
assert '.sieve-builder .checkbox-row input[type="checkbox"]' in responsive
assert ".dialog > .dialog-card" in responsive
assert ".dialog>.dialog-card" in responsive
assert "grid-template-rows: auto minmax(0, 1fr)" in responsive
assert ".calendar-toolbar" in responsive
assert ".message-meta.addresses-expanded" in responsive
+52
View File
@@ -0,0 +1,52 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def read(path):
return (ROOT / path).read_text()
def test_release_version():
assert 'version = "0.0.5"' in read("Cargo.toml")
assert "# RustBox 0.0.5" in read("README.md")
def test_realtime_contract():
ws = read("src/realtime/ws.rs")
js = read("src/web/js/80-settings-realtime.js")
assert '"type": "heartbeat"' in ws
assert "Heartbeat timeout" in js
assert "2 ** attempt" in js
assert "resyncRealtimeState" in js
assert "realtimeSeenEvents" in js
assert "realtimePollTimer" in js
assert "realtimeRefreshEvents" in js
def test_upload_progress_is_not_toast_driven():
compose = read("src/web/js/50-compose.js")
block = compose[compose.index("async function uploadComposeFiles"):compose.index("function previewMarkdown")]
assert "progressToast(" not in block
assert "setComposeUploadProgress" in block
assert "AbortController" in block
def test_fullscreen_reader_contract():
html = read("src/web/index.html")
reader = read("src/web/js/40-messages-reader.js")
menu = read("src/web/js/60-mail-actions-search.js")
css = read("src/web/css/30-mail.css")
assert 'id="reader-fullscreen"' in html
assert "Open full screen" in menu
assert "message-fullscreen-action" in reader
assert "reader-fullscreen" in reader
assert "history.pushState" in reader
assert "reader-pane.reader-fullscreen" in css
assert ".reader-pane.reader-fullscreen .message-body" in css
assert "max-width: none" in css
def test_mobile_reader_contract():
css = read("src/web/css/30-mail.css")
responsive = read("src/web/css/60-responsive.css")
bindings = read("src/web/js/95-bindings-boot.js")
assert ".toolbar-menu-popover button" in css
assert ".attachment-item .attachment-button" in css
assert "min-height: 34px" in responsive
assert 'bottom: "8px"' not in bindings
assert 'rect.bottom + 5' in bindings