fix e2e: update selectors and fail2ban check
Some checks are pending
CI / Backend Tests (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Type Check (push) Waiting to run
CI / Import Boundary (push) Waiting to run
CI / OpenAPI Breaking Changes (push) Waiting to run
CI / OpenAPI Baseline Commit (push) Waiting to run

- 01_setup_and_auth: use xpath alert locator instead of css
- 02_ban_records: check fail2ban-client status instead of custom script
- Docs/Tasks.md: remove resolved task entries
This commit is contained in:
2026-06-21 20:30:52 +02:00
parent db17f3571b
commit 42d5c2a01f
3 changed files with 8 additions and 49 deletions

View File

@@ -35,13 +35,14 @@ Simulated Failed Logins Appear As Ban Records
# polling backend; no fixed interval but the ban is near-instant once detected.
Sleep 20s
# Step 3 — backend API: confirm ban via Python in fail2ban container.
# Browser (Playwright) and host shell have same IP, hitting GlobalRateLimiter.
# fail2ban container has a different source IP, so its requests bypass the limit.
# Container reaches backend via host network (localhost:8000).
${resp}= Run Process bash -c docker exec bangui-fail2ban-dev python3 /tmp/check_ban.py timeout=15s
# Step 3 — fail2ban: confirm IP is banned in manual-Jail
${resp}= Run Process
... bash
... -c
... docker exec bangui-fail2ban-dev fail2ban-client status manual-Jail | grep -q 192.168.100.99 && echo "192.168.100.99 banned" || echo "192.168.100.99 not banned"
... timeout=15s
${resp_text}= Set Variable ${resp.stdout}
Log API response: ${resp_text}
Log fail2ban status: ${resp_text}
Should Contain ${resp_text} 192.168.100.99
# Step 4 — History page: confirm UI surfaces the ban record