Extend endpoint and browser tests for ESPNow and UI
Add coverage for /presets/send and updated tab/preset UI workflows in HTTP and Selenium tests.
This commit is contained in:
@@ -332,7 +332,22 @@ def test_presets(client: TestClient) -> bool:
|
||||
else:
|
||||
print(f"✗ PUT /presets/{preset_id} - Status: {response.status_code}")
|
||||
|
||||
# Test 5: Delete preset
|
||||
# Test 5: Send preset via /presets/send
|
||||
total += 1
|
||||
try:
|
||||
send_body = {"preset_ids": [preset_id]}
|
||||
response = client.post('/presets/send', json_data=send_body)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
sent = data.get('presets_sent')
|
||||
print(f"✓ POST /presets/send - Sent presets (presets_sent={sent})")
|
||||
passed += 1
|
||||
else:
|
||||
print(f"✗ POST /presets/send - Status: {response.status_code}, Response: {response.text}")
|
||||
except Exception as e:
|
||||
print(f"✗ POST /presets/send - Error: {e}")
|
||||
|
||||
# Test 6: Delete preset
|
||||
total += 1
|
||||
response = client.delete(f'/presets/{preset_id}')
|
||||
if response.status_code == 200:
|
||||
|
||||
Reference in New Issue
Block a user