fix(e2e): resolve SPA auth race conditions in Robot tests

- Rework Login As Admin: use sessionStorage flag + relative fetch login + polling loop
- Add data-testid to JailDetailPage error render path
- Add Collections library import for Get From List keyword
- Fix /jails API response extraction (returns {items, total} not plain list)
- Change Close Context to Close Browser for proper browser cleanup
- Add domcontentloaded + Sleep + polling to Config test to avoid premature timeout

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-06 06:53:09 +02:00
parent 48ef85bec5
commit d4bab89cf3
8 changed files with 167 additions and 205 deletions

View File

@@ -1,3 +1,37 @@
# E2E Tests — Running Robot Framework Tests
## Setup
Install dependencies:
```bash
pip install -r requirements.txt
rfbrowser init
```
## Run All Tests
```bash
robot --outputdir results --log log.html --report report.html tests/
```
## Run Specific Test File
```bash
robot --outputdir results tests/01_page_loading.robot
```
## Run with Browser Visible
```bash
robot --outputdir results --variable BROWSER:chromium tests/
```
## View Results
Open `results/log.html` or `results/report.html` in a browser.
---
# AI Agent — General Instructions
You are an autonomous coding agent working on **BanGUI**, a web application for monitoring, managing, and configuring fail2ban through a clean web interface. This document defines how you operate, what rules you follow, and which workflow you repeat for every task.