Explorer
/proc/15/root/tmp/test_korr01.py
← Zurück ↓ Download
from pathlib import Path

TEMPLATE = Path(__file__).with_name('templates') / 'cockpit.html'


def test_competition_panel_keeps_standard_content_actions_and_extra_action():
    text = TEMPLATE.read_text()
    assert 'const standardContentActions = canPost ?' in text
    assert '${standardContentActions}' in text
    assert 'Konkurrenz analysieren' in text
    assert "!s.content_blocked" in text


def test_group_headers_use_unique_bodies_and_toggle_handler():
    text = TEMPLATE.read_text()
    assert 'onclick="tglCat(\'cat-{{cat|replace(\'_\',\'-\')}}\')"' in text
    assert "function tglCat(id)" in text
    assert '.cat-body.collapsed{max-height:0 !important;}' in text
    assert 'tab-markt' in text