mirror of
https://github.com/smittix/intercept.git
synced 2026-07-07 17:18:11 -07:00
fix(modes): deep-linked mode scripts fail when body not yet parsed
ensureModeScript() used document.body.appendChild() to load lazy mode scripts, but the preload for ?mode= query params runs in <head> before <body> exists, causing all deep-linked modes to silently fail. Also fix cross-mode handoffs (BT→BT Locate, WiFi→WiFi Locate, Spy Stations→Waterfall) that assumed target module was already loaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -29,8 +29,7 @@ def test_predict_passes_invalid_coords(client):
|
||||
def test_fetch_celestrak_invalid_category(client):
|
||||
"""Verify that an unauthorized category is rejected."""
|
||||
response = client.get('/satellite/celestrak/category_fake')
|
||||
# The code returns 200 but includes an error message in the JSON body
|
||||
assert response.status_code == 200
|
||||
assert response.status_code == 400
|
||||
assert response.json['status'] == 'error'
|
||||
assert 'Invalid category' in response.json['message']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user