18 lines
600 B
Python
18 lines
600 B
Python
from pathlib import Path
|
|
|
|
|
|
def test_index_contains_session_crisis_state_and_tracking_hooks():
|
|
html = Path('index.html').read_text()
|
|
assert 'var sessionCrisis' in html
|
|
assert 'function trackCrisis(text)' in html
|
|
assert 'function getSessionContext()' in html
|
|
assert 'function resetSessionCrisis()' in html
|
|
assert 'trackCrisis(text);' in html
|
|
assert 'SESSION CONTEXT:' in html
|
|
|
|
|
|
def test_new_session_resets_crisis_state():
|
|
html = Path('index.html').read_text()
|
|
assert 'resetSessionCrisis()' in html
|
|
assert "localStorage.removeItem('timmy_chat_history');" in html
|