feat: add e2e test suite with Robot Framework
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.
This commit is contained in:
13
e2e/tests/01_page_loading.robot
Normal file
13
e2e/tests/01_page_loading.robot
Normal file
@@ -0,0 +1,13 @@
|
||||
*** Settings ***
|
||||
Resource ${CURDIR}/../../resources/common.resource
|
||||
|
||||
*** Test Cases ***
|
||||
Page Loads And Shows Navigation
|
||||
New Browser chromium headless=${TRUE}
|
||||
New Page ${FRONTEND_URL}
|
||||
|
||||
# Confirm the page title or root element is present.
|
||||
${title}= Get Title
|
||||
Should Not Be Empty ${title}
|
||||
|
||||
Close Browser
|
||||
16
e2e/tests/02_ban_records.robot
Normal file
16
e2e/tests/02_ban_records.robot
Normal file
@@ -0,0 +1,16 @@
|
||||
*** Settings ***
|
||||
Resource ${CURDIR}/../../resources/common.resource
|
||||
Resource ${CURDIR}/../../resources/auth.resource
|
||||
|
||||
*** Test Cases ***
|
||||
Ban Records Are Visible
|
||||
New Browser chromium headless=${TRUE}
|
||||
Login As Admin
|
||||
|
||||
Go To ${FRONTEND_URL}/bans
|
||||
|
||||
# Basic presence check — the ban table or empty state should be present.
|
||||
${content}= Get Page Source
|
||||
Should Not Be Empty ${content}
|
||||
|
||||
Close Browser
|
||||
15
e2e/tests/03_blocklist_import.robot
Normal file
15
e2e/tests/03_blocklist_import.robot
Normal file
@@ -0,0 +1,15 @@
|
||||
*** Settings ***
|
||||
Resource ${CURDIR}/../../resources/common.resource
|
||||
Resource ${CURDIR}/../../resources/auth.resource
|
||||
|
||||
*** Test Cases ***
|
||||
Blocklist Import Page Opens
|
||||
New Browser chromium headless=${TRUE}
|
||||
Login As Admin
|
||||
|
||||
Go To ${FRONTEND_URL}/blocklists
|
||||
|
||||
${content}= Get Page Source
|
||||
Should Not Be Empty ${content}
|
||||
|
||||
Close Browser
|
||||
15
e2e/tests/04_config_edit.robot
Normal file
15
e2e/tests/04_config_edit.robot
Normal file
@@ -0,0 +1,15 @@
|
||||
*** Settings ***
|
||||
Resource ${CURDIR}/../../resources/common.resource
|
||||
Resource ${CURDIR}/../../resources/auth.resource
|
||||
|
||||
*** Test Cases ***
|
||||
Config Edit Page Opens
|
||||
New Browser chromium headless=${TRUE}
|
||||
Login As Admin
|
||||
|
||||
Go To ${FRONTEND_URL}/config
|
||||
|
||||
${content}= Get Page Source
|
||||
Should Not Be Empty ${content}
|
||||
|
||||
Close Browser
|
||||
Reference in New Issue
Block a user