Add e2e/ dir with Robot Framework tests for page loading, ban records, blocklist import, config edit. Add requirements.txt. Update Makefile with test commands. Update .gitignore, backend docs, testing requirements docs.
25 lines
837 B
Plaintext
25 lines
837 B
Plaintext
*** Settings ***
|
|
Library Browser
|
|
Library HttpLibrary
|
|
|
|
Variables ${CURDIR}/../../.env
|
|
|
|
# Health check timeout for suite setup (120 s poll interval).
|
|
Suite Setup Wait For Backend Health timeout=120 interval=5
|
|
|
|
*** Variables ***
|
|
${FRONTEND_URL} http://localhost:5173
|
|
${BACKEND_URL} http://localhost:8000
|
|
|
|
*** Keywords ***
|
|
Wait For Backend Health
|
|
[Arguments] ${timeout}=120 ${interval}=5
|
|
${deadline}= Evaluate time.time() + ${timeout}
|
|
WHILE True
|
|
${now}= Evaluate time.time()
|
|
IF ${now} >= ${deadline} FAIL Backend did not become healthy within ${timeout} seconds
|
|
${response}= GET ${BACKEND_URL}/api/health expected_status=200
|
|
IF ${response.status} == 200 BREAK
|
|
Sleep ${interval}
|
|
END
|
|
Log Backend is healthy. |