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
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:
@@ -128,7 +128,7 @@ Incomplete Password Shows Complexity Error
|
||||
Fill Text css=input[aria-label="Master Password"] short
|
||||
Click css=button[type="submit"]
|
||||
|
||||
Wait For Elements State css=[aria-label="Master Password"] attached timeout=5s
|
||||
Wait For Elements State xpath=//*[@aria-label="Master Password"]/ancestor::*[contains(@class,"field")]//*[@role="alert"] visible timeout=10s
|
||||
${msg}= Get Text xpath=//*[@aria-label="Master Password"]/ancestor::*[contains(@class,"field")]//*[@role="alert"]
|
||||
Should Contain ${msg} Password must meet all complexity requirements.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user