mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 23:12:22 +02:00
15 lines
512 B
Python
15 lines
512 B
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_notification_copy_supports_insecure_lan_contexts():
|
|
source = (ROOT / "static/js/admin.js").read_text(encoding="utf-8")
|
|
|
|
assert "async function copyNotificationText(value)" in source
|
|
assert "navigator.clipboard?.writeText && window.isSecureContext" in source
|
|
assert "document.execCommand('copy')" in source
|
|
assert "await copyNotificationText(note.body)" in source
|
|
assert "event.stopPropagation();" in source
|