backup
This commit is contained in:
50
tests/robot/ui/anime_settings.robot
Normal file
50
tests/robot/ui/anime_settings.robot
Normal file
@@ -0,0 +1,50 @@
|
||||
*** Settings ***
|
||||
Documentation Anime settings page UI tests for Aniworld.
|
||||
... Covers page load, regenerate NFO, and update series settings.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Create Anonymous Session
|
||||
... AND Setup Master Password
|
||||
... AND Open Browser To Page /login
|
||||
... AND Perform Login
|
||||
... AND Wait For Elements State id=search-input visible timeout=5s
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Anime Settings Page Load
|
||||
# ---------------------------------------------------------------------------
|
||||
Anime Settings Page Loads
|
||||
[Documentation] Navigate to anime settings page and verify form elements.
|
||||
Go To ${BASE_URL}/anime/settings?key=attack-on-titan
|
||||
Wait For Elements State id=anime-settings-form visible timeout=5s
|
||||
Page Title Should Contain Settings
|
||||
Element Should Be Visible id=anime-settings-form
|
||||
Element Should Be Visible id=regenerate-nfo-btn
|
||||
Element Should Be Visible id=save-anime-settings-btn
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Regenerate NFO
|
||||
# ---------------------------------------------------------------------------
|
||||
Regenerate NFO
|
||||
[Documentation] Click regenerate NFO and verify success notification.
|
||||
Go To ${BASE_URL}/anime/settings?key=attack-on-titan
|
||||
Wait For Elements State id=regenerate-nfo-btn visible timeout=5s
|
||||
Click id=regenerate-nfo-btn
|
||||
Toast Should Contain NFO
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Update Series Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
Update Series Settings
|
||||
[Documentation] Change series settings and save.
|
||||
Go To ${BASE_URL}/anime/settings?key=attack-on-titan
|
||||
Wait For Elements State id=anime-settings-form visible timeout=5s
|
||||
Select Options By id=preferred-language-select text German
|
||||
Fill Text id=custom-folder-input Attack on Titan Custom
|
||||
Click id=save-anime-settings-btn
|
||||
Toast Should Contain saved
|
||||
112
tests/robot/ui/dashboard.robot
Normal file
112
tests/robot/ui/dashboard.robot
Normal file
@@ -0,0 +1,112 @@
|
||||
*** Settings ***
|
||||
Documentation Dashboard UI tests for Aniworld.
|
||||
... Covers search, theme toggle, rescan, series filters, select all, and download selected.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Create Anonymous Session
|
||||
... AND Setup Master Password
|
||||
... AND Open Browser To Page /login
|
||||
... AND Perform Login
|
||||
... AND Wait For Elements State id=search-input visible timeout=5s
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Dashboard Load
|
||||
# ---------------------------------------------------------------------------
|
||||
Dashboard Loads
|
||||
[Documentation] Verify the main dashboard loads with key elements.
|
||||
Page Title Should Contain AniWorld
|
||||
Element Should Be Visible id=search-input
|
||||
Element Should Be Visible id=search-btn
|
||||
Element Should Be Visible id=rescan-btn
|
||||
Element Should Be Visible id=theme-toggle
|
||||
Element Should Be Visible id=config-btn
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Search
|
||||
# ---------------------------------------------------------------------------
|
||||
Search For Anime
|
||||
[Documentation] Type a query and submit search, verifying results appear.
|
||||
Search For Anime attack
|
||||
Element Should Be Visible id=search-results-list
|
||||
${results}= Get Element Count id=search-results-list > *
|
||||
Should Be True ${results} >= 0
|
||||
|
||||
Clear Search
|
||||
[Documentation] Click clear search and verify results are hidden.
|
||||
Search For Anime attack
|
||||
Clear Search
|
||||
Element Should Be Hidden id=search-results
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Theme Toggle
|
||||
# ---------------------------------------------------------------------------
|
||||
Theme Toggle To Dark
|
||||
[Documentation] Click theme toggle and verify dark theme is applied.
|
||||
${before}= Get Current Theme
|
||||
Should Be Equal As Strings ${before} light
|
||||
Toggle Theme
|
||||
${after}= Get Current Theme
|
||||
Should Be Equal As Strings ${after} dark
|
||||
|
||||
Theme Toggle To Light
|
||||
[Documentation] Click theme toggle twice and verify back to light.
|
||||
Toggle Theme
|
||||
Toggle Theme
|
||||
${theme}= Get Current Theme
|
||||
Should Be Equal As Strings ${theme} light
|
||||
|
||||
Theme Persists After Reload
|
||||
[Documentation] Toggle to dark, reload, and verify theme persists.
|
||||
Toggle Theme
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
${theme}= Get Current Theme
|
||||
Should Be Equal As Strings ${theme} dark
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Rescan
|
||||
# ---------------------------------------------------------------------------
|
||||
Rescan Button
|
||||
[Documentation] Click the rescan button and verify the status indicator changes.
|
||||
Click id=rescan-btn
|
||||
Wait For Elements State #rescan-status .status-dot.scanning visible timeout=5s
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Series Filters
|
||||
# ---------------------------------------------------------------------------
|
||||
Show Missing Episodes Only
|
||||
[Documentation] Click the missing episodes filter and verify UI updates.
|
||||
Click id=show-missing-only
|
||||
${active}= Get Attribute id=show-missing-only data-active
|
||||
Should Be Equal As Strings ${active} true
|
||||
|
||||
Show All Series
|
||||
[Documentation] Click show all and verify filter is overridden.
|
||||
Click id=show-all-series
|
||||
${active}= Get Attribute id=show-all-series data-active
|
||||
Should Be Equal As Strings ${active} true
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Selection & Download
|
||||
# ---------------------------------------------------------------------------
|
||||
Select All Series
|
||||
[Documentation] Click select all and verify all series checkboxes are checked.
|
||||
Click id=select-all
|
||||
${checked}= Get Element Count .series-card input:checked
|
||||
Should Be True ${checked} >= 0
|
||||
|
||||
Download Selected
|
||||
[Documentation] Select a series and click download selected.
|
||||
# Check first series card checkbox if any exist
|
||||
${count}= Get Element Count .series-card input[type="checkbox"]
|
||||
IF ${count} > 0
|
||||
Click .series-card input[type="checkbox"] >> nth=0
|
||||
Click id=download-selected
|
||||
Toast Should Contain queue
|
||||
END
|
||||
85
tests/robot/ui/login.robot
Normal file
85
tests/robot/ui/login.robot
Normal file
@@ -0,0 +1,85 @@
|
||||
*** Settings ***
|
||||
Documentation Login UI tests for Aniworld.
|
||||
... Covers login page load, valid/invalid login, rate limit UI, password visibility, and logout.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Create Anonymous Session
|
||||
... AND Setup Master Password
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Login Page Load
|
||||
# ---------------------------------------------------------------------------
|
||||
Login Page Loads
|
||||
[Documentation] Verify the login page loads with all form elements.
|
||||
Open Browser To Page /login
|
||||
Page Title Should Contain Login
|
||||
Element Should Be Visible id=password-input
|
||||
Element Should Be Visible id=login-submit-btn
|
||||
Element Should Be Visible id=password-toggle
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Valid Login
|
||||
# ---------------------------------------------------------------------------
|
||||
Login With Valid Password
|
||||
[Documentation] Log in with the correct password and verify redirect to dashboard.
|
||||
Open Browser To Page /login
|
||||
Perform Login ${SETUP_PASSWORD}
|
||||
Page Title Should Contain AniWorld
|
||||
Element Should Be Visible id=search-input
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Invalid Login
|
||||
# ---------------------------------------------------------------------------
|
||||
Login With Invalid Password
|
||||
[Documentation] Log in with an incorrect password and verify error message.
|
||||
Open Browser To Page /login
|
||||
Fill Text id=password-input WrongPass123!
|
||||
Click id=login-submit-btn
|
||||
Element Should Be Visible id=login-error
|
||||
Element Text Should Contain id=login-error invalid
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Rate Limit UI
|
||||
# ---------------------------------------------------------------------------
|
||||
Login Rate Limit UI
|
||||
[Documentation] Submit multiple failed logins and verify lockout message appears.
|
||||
Open Browser To Page /login
|
||||
FOR ${i} IN RANGE 6
|
||||
Fill Text id=password-input WrongPass123!
|
||||
Click id=login-submit-btn
|
||||
Wait For Elements State id=login-error visible timeout=3s
|
||||
END
|
||||
Element Text Should Contain id=login-error lockout
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Password Visibility Toggle
|
||||
# ---------------------------------------------------------------------------
|
||||
Password Visibility Toggle
|
||||
[Documentation] Click the eye icon and verify the password field type toggles.
|
||||
Open Browser To Page /login
|
||||
Fill Text id=password-input ${SETUP_PASSWORD}
|
||||
${type_before}= Get Attribute id=password-input type
|
||||
Should Be Equal As Strings ${type_before} password
|
||||
Click id=password-toggle
|
||||
${type_after}= Get Attribute id=password-input type
|
||||
Should Be Equal As Strings ${type_after} text
|
||||
Click id=password-toggle
|
||||
${type_final}= Get Attribute id=password-input type
|
||||
Should Be Equal As Strings ${type_final} password
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Logout
|
||||
# ---------------------------------------------------------------------------
|
||||
Logout
|
||||
[Documentation] Log in then log out and verify redirect to login page.
|
||||
Open Browser To Page /login
|
||||
Perform Login ${SETUP_PASSWORD}
|
||||
Perform Logout
|
||||
Page Title Should Contain Login
|
||||
Element Should Be Visible id=password-input
|
||||
106
tests/robot/ui/queue_page.robot
Normal file
106
tests/robot/ui/queue_page.robot
Normal file
@@ -0,0 +1,106 @@
|
||||
*** Settings ***
|
||||
Documentation Queue page UI tests for Aniworld.
|
||||
... Covers page load, stats cards, start/stop buttons, clear confirmations, retry all, and navigation.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Create Anonymous Session
|
||||
... AND Setup Master Password
|
||||
... AND Open Browser To Page /login
|
||||
... AND Perform Login
|
||||
... AND Navigate To Queue Page
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Queue Page Load
|
||||
# ---------------------------------------------------------------------------
|
||||
Queue Page Loads
|
||||
[Documentation] Verify the queue page loads with all sections and stats.
|
||||
Page Title Should Contain Queue
|
||||
Element Should Be Visible id=total-items
|
||||
Element Should Be Visible id=pending-items
|
||||
Element Should Be Visible id=completed-items
|
||||
Element Should Be Visible id=failed-items
|
||||
Element Should Be Visible id=pending-queue
|
||||
Element Should Be Visible id=active-downloads
|
||||
Element Should Be Visible id=completed-downloads
|
||||
Element Should Be Visible id=failed-downloads
|
||||
|
||||
Queue Stats Cards Display Zero Initially
|
||||
[Documentation] Verify all stat cards show 0 when queue is empty.
|
||||
${total}= Get Text id=total-items
|
||||
Should Be Equal As Strings ${total} 0
|
||||
${pending}= Get Text id=pending-items
|
||||
Should Be Equal As Strings ${pending} 0
|
||||
${completed}= Get Text id=completed-items
|
||||
Should Be Equal As Strings ${completed} 0
|
||||
${failed}= Get Text id=failed-items
|
||||
Should Be Equal As Strings ${failed} 0
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Queue Controls
|
||||
# ---------------------------------------------------------------------------
|
||||
Start Queue Button
|
||||
[Documentation] Click start queue and verify button state changes.
|
||||
${disabled}= Get Attribute id=start-queue-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
Click id=start-queue-btn
|
||||
Wait For Elements State id=stop-queue-btn visible timeout=3s
|
||||
END
|
||||
|
||||
Stop Queue Button
|
||||
[Documentation] Click stop queue and verify button state changes.
|
||||
${disabled}= Get Attribute id=stop-queue-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
Click id=stop-queue-btn
|
||||
Wait For Elements State id=start-queue-btn visible timeout=3s
|
||||
END
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Clear Operations
|
||||
# ---------------------------------------------------------------------------
|
||||
Clear Completed Confirmation
|
||||
[Documentation] Click clear completed and verify confirmation modal appears.
|
||||
${disabled}= Get Attribute id=clear-completed-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
Click id=clear-completed-btn
|
||||
Element Should Be Visible id=confirm-modal
|
||||
Element Text Should Contain id=confirm-modal clear
|
||||
Click id=confirm-cancel
|
||||
Element Should Be Hidden id=confirm-modal
|
||||
END
|
||||
|
||||
Clear Failed Confirmation
|
||||
[Documentation] Click clear failed and verify confirmation modal appears.
|
||||
${disabled}= Get Attribute id=clear-failed-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
Click id=clear-failed-btn
|
||||
Element Should Be Visible id=confirm-modal
|
||||
Element Text Should Contain id=confirm-modal clear
|
||||
Click id=confirm-cancel
|
||||
Element Should Be Hidden id=confirm-modal
|
||||
END
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Retry All
|
||||
# ---------------------------------------------------------------------------
|
||||
Retry All Failed
|
||||
[Documentation] Click retry all and verify UI feedback.
|
||||
${disabled}= Get Attribute id=retry-all-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
Click id=retry-all-btn
|
||||
Toast Should Contain retry
|
||||
END
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Navigation
|
||||
# ---------------------------------------------------------------------------
|
||||
Navigation Back To Main
|
||||
[Documentation] Click the back button and verify redirect to main page.
|
||||
Click text=Back to Main
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
Page Title Should Contain AniWorld
|
||||
86
tests/robot/ui/responsive.robot
Normal file
86
tests/robot/ui/responsive.robot
Normal file
@@ -0,0 +1,86 @@
|
||||
*** Settings ***
|
||||
Documentation Responsive design UI tests for Aniworld.
|
||||
... Covers mobile and tablet viewport layouts and touch interactions.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Create Anonymous Session
|
||||
... AND Setup Master Password
|
||||
... AND Open Browser To Page /login
|
||||
... AND Perform Login
|
||||
... AND Wait For Elements State id=search-input visible timeout=5s
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Mobile Viewport
|
||||
# ---------------------------------------------------------------------------
|
||||
Mobile Viewport Layout
|
||||
[Documentation] Resize to mobile and verify layout adapts.
|
||||
Set Mobile Viewport
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
${width}= Evaluate window.innerWidth
|
||||
Should Be True ${width} <= 480
|
||||
Element Should Be Visible id=search-input
|
||||
Element Should Be Visible id=theme-toggle
|
||||
|
||||
Mobile Menu Accessible
|
||||
[Documentation] Verify hamburger menu or compact header on mobile.
|
||||
Set Mobile Viewport
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
# On mobile, header actions may collapse into a menu
|
||||
${menu_visible}= Run Keyword And Return Status
|
||||
... Wait For Elements State id=mobile-menu-btn visible timeout=2s
|
||||
IF ${menu_visible}
|
||||
Click id=mobile-menu-btn
|
||||
Element Should Be Visible id=mobile-menu
|
||||
END
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Tablet Viewport
|
||||
# ---------------------------------------------------------------------------
|
||||
Tablet Viewport Layout
|
||||
[Documentation] Resize to tablet and verify layout adapts.
|
||||
Set Tablet Viewport
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
${width}= Evaluate window.innerWidth
|
||||
Should Be True ${width} >= 768
|
||||
Element Should Be Visible id=search-input
|
||||
Element Should Be Visible id=rescan-btn
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Touch Interactions
|
||||
# ---------------------------------------------------------------------------
|
||||
Touch Buttons Clickable
|
||||
[Documentation] Verify buttons remain clickable on touch-sized viewport.
|
||||
Set Mobile Viewport
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
# Try clicking theme toggle
|
||||
Click id=theme-toggle
|
||||
${theme}= Get Current Theme
|
||||
Should Be Equal As Strings ${theme} dark
|
||||
# Toggle back
|
||||
Click id=theme-toggle
|
||||
${theme}= Get Current Theme
|
||||
Should Be Equal As Strings ${theme} light
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Desktop Viewport Reset
|
||||
# ---------------------------------------------------------------------------
|
||||
Desktop Viewport Reset
|
||||
[Documentation] Resize back to desktop and verify normal layout.
|
||||
Set Desktop Viewport
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
${width}= Evaluate window.innerWidth
|
||||
Should Be True ${width} >= 1280
|
||||
Element Should Be Visible id=search-input
|
||||
Element Should Be Visible id=rescan-btn
|
||||
Element Should Be Visible id=config-btn
|
||||
164
tests/robot/ui/settings_modal.robot
Normal file
164
tests/robot/ui/settings_modal.robot
Normal file
@@ -0,0 +1,164 @@
|
||||
*** Settings ***
|
||||
Documentation Settings modal UI tests for Aniworld.
|
||||
... Covers open/close, edit all config sections, save, backup/restore, and export/import.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Create Anonymous Session
|
||||
... AND Setup Master Password
|
||||
... AND Open Browser To Page /login
|
||||
... AND Perform Login
|
||||
... AND Wait For Elements State id=search-input visible timeout=5s
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Modal Open/Close
|
||||
# ---------------------------------------------------------------------------
|
||||
Open Settings Modal
|
||||
[Documentation] Click the config button and verify the modal opens.
|
||||
Open Settings Modal
|
||||
Element Should Be Visible id=config-modal
|
||||
|
||||
Close Settings Modal Via Button
|
||||
[Documentation] Click the close button and verify the modal closes.
|
||||
Open Settings Modal
|
||||
Close Settings Modal
|
||||
Element Should Be Hidden id=config-modal
|
||||
|
||||
Close Settings Modal Via Overlay
|
||||
[Documentation] Click the modal overlay and verify the modal closes.
|
||||
Open Settings Modal
|
||||
Click id=config-modal .modal-overlay
|
||||
Wait For Elements State id=config-modal hidden timeout=3s
|
||||
Element Should Be Hidden id=config-modal
|
||||
|
||||
Close Settings Modal Via Escape
|
||||
[Documentation] Press Escape and verify the modal closes.
|
||||
Open Settings Modal
|
||||
Press Keys id=config-modal Escape
|
||||
Wait For Elements State id=config-modal hidden timeout=3s
|
||||
Element Should Be Hidden id=config-modal
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# General Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
Edit General Settings
|
||||
[Documentation] Change app name, data dir, and anime directory.
|
||||
Open Settings Modal
|
||||
Fill General Settings UpdatedApp data /tmp/updated_anime
|
||||
Save Settings
|
||||
Toast Should Contain saved
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Scheduler Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
Edit Scheduler Settings
|
||||
[Documentation] Toggle scheduler enabled and change time/days.
|
||||
Open Settings Modal
|
||||
Check Checkbox id=scheduled-rescan-enabled
|
||||
Fill Text id=scheduler-time-input 04:30
|
||||
# Select days (simplified - actual implementation depends on UI widgets)
|
||||
Save Settings
|
||||
Toast Should Contain saved
|
||||
|
||||
Disable Scheduler
|
||||
[Documentation] Uncheck scheduler enabled and save.
|
||||
Open Settings Modal
|
||||
Uncheck Checkbox id=scheduled-rescan-enabled
|
||||
Save Settings
|
||||
Toast Should Contain saved
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Logging Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
Edit Logging Settings
|
||||
[Documentation] Change log level, file path, max bytes, and backup count.
|
||||
Open Settings Modal
|
||||
Select Options By id=logging-level-select text DEBUG
|
||||
Fill Text id=logging-file-input logs/test.log
|
||||
Fill Text id=logging-max-bytes-input 1048576
|
||||
Fill Text id=logging-backup-count-input 5
|
||||
Save Settings
|
||||
Toast Should Contain saved
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Backup Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
Edit Backup Settings
|
||||
[Documentation] Toggle backup enabled and change path/retention.
|
||||
Open Settings Modal
|
||||
Check Checkbox id=backup-enabled
|
||||
Fill Text id=backup-path-input /tmp/aniworld_backups
|
||||
Fill Text id=backup-keep-days-input 14
|
||||
Save Settings
|
||||
Toast Should Contain saved
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# NFO Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
Edit NFO Settings
|
||||
[Documentation] Enter TMDB key and toggle auto-create/media downloads.
|
||||
Open Settings Modal
|
||||
Fill Text id=tmdb-api-key-input test_tmdb_key_123
|
||||
Check Checkbox id=nfo-auto-create
|
||||
Check Checkbox id=nfo-download-poster
|
||||
Check Checkbox id=nfo-download-logo
|
||||
Check Checkbox id=nfo-download-fanart
|
||||
Save Settings
|
||||
Toast Should Contain saved
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Backup Management
|
||||
# ---------------------------------------------------------------------------
|
||||
Create Config Backup
|
||||
[Documentation] Click create backup and verify success notification.
|
||||
Open Settings Modal
|
||||
Click id=create-backup-btn
|
||||
Toast Should Contain backup
|
||||
|
||||
Restore Config Backup
|
||||
[Documentation] Select a backup and click restore.
|
||||
Open Settings Modal
|
||||
Click id=create-backup-btn
|
||||
Toast Should Contain backup
|
||||
# Select first backup in list
|
||||
${count}= Get Element Count .backup-item
|
||||
IF ${count} > 0
|
||||
Click .backup-item >> nth=0
|
||||
Click id=restore-backup-btn
|
||||
Toast Should Contain restore
|
||||
END
|
||||
|
||||
Delete Config Backup
|
||||
[Documentation] Select a backup and click delete.
|
||||
Open Settings Modal
|
||||
Click id=create-backup-btn
|
||||
Toast Should Contain backup
|
||||
${count}= Get Element Count .backup-item
|
||||
IF ${count} > 0
|
||||
Click .backup-item >> nth=0
|
||||
Click id=delete-backup-btn
|
||||
Toast Should Contain delete
|
||||
END
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Export / Import
|
||||
# ---------------------------------------------------------------------------
|
||||
Export Config
|
||||
[Documentation] Click export config and verify download starts.
|
||||
Open Settings Modal
|
||||
${dl_promise}= Promise To Wait For Event download
|
||||
Click id=export-config-btn
|
||||
${download}= Wait For ${dl_promise}
|
||||
Should Not Be Empty ${download}
|
||||
|
||||
Import Config
|
||||
[Documentation] Upload a config file and verify it is applied.
|
||||
Open Settings Modal
|
||||
Upload File By Selector id=import-config-input ${CURDIR}/../fixtures/sample_config.json
|
||||
Click id=import-config-btn
|
||||
Toast Should Contain import
|
||||
95
tests/robot/ui/setup_flow.robot
Normal file
95
tests/robot/ui/setup_flow.robot
Normal file
@@ -0,0 +1,95 @@
|
||||
*** Settings ***
|
||||
Documentation Setup flow UI tests for Aniworld.
|
||||
... Covers setup page load, password strength, form validation, and complete setup submission.
|
||||
|
||||
Resource ${CURDIR}/../resources/common.resource
|
||||
Resource ${CURDIR}/../resources/ui_keywords.resource
|
||||
|
||||
Test Setup Run Keywords
|
||||
... Open Browser To Page /setup
|
||||
... AND Wait For Elements State id=setup-form visible timeout=5s
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Setup Page Load
|
||||
# ---------------------------------------------------------------------------
|
||||
Setup Page Loads
|
||||
[Documentation] Verify the setup page loads with all expected sections.
|
||||
Page Title Should Contain Setup
|
||||
Element Should Be Visible id=setup-form
|
||||
Element Should Be Visible id=general-section
|
||||
Element Should Be Visible id=security-section
|
||||
Element Should Be Visible id=scheduler-section
|
||||
Element Should Be Visible id=logging-section
|
||||
Element Should Be Visible id=backup-section
|
||||
Element Should Be Visible id=nfo-section
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Password Strength Indicator
|
||||
# ---------------------------------------------------------------------------
|
||||
Password Strength Weak
|
||||
[Documentation] Type a weak password and verify the strength indicator shows weak.
|
||||
Fill Text id=master-password-input weak
|
||||
${strength}= Get Text id=password-strength
|
||||
Should Contain ${strength} weak
|
||||
|
||||
Password Strength Medium
|
||||
[Documentation] Type a medium-strength password and verify the indicator updates.
|
||||
Fill Text id=master-password-input Medium1!
|
||||
${strength}= Get Text id=password-strength
|
||||
Should Contain ${strength} medium
|
||||
|
||||
Password Strength Strong
|
||||
[Documentation] Type a strong password and verify the indicator shows strong.
|
||||
Fill Text id=master-password-input ${SETUP_PASSWORD}
|
||||
${strength}= Get Text id=password-strength
|
||||
Should Contain ${strength} strong
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Form Validation
|
||||
# ---------------------------------------------------------------------------
|
||||
Setup Form Validation Empty Password
|
||||
[Documentation] Submit the form with an empty password and verify error message.
|
||||
Fill Text id=app-name-input TestApp
|
||||
Fill Text id=anime-directory-input /tmp/test
|
||||
Click id=setup-submit-btn
|
||||
Element Should Be Visible id=password-error
|
||||
Element Text Should Contain id=password-error required
|
||||
|
||||
Setup Form Validation Mismatched Passwords
|
||||
[Documentation] Submit with mismatched password and confirmation.
|
||||
Fill Text id=master-password-input ${SETUP_PASSWORD}
|
||||
Fill Text id=confirm-password-input DifferentPass123!
|
||||
Click id=setup-submit-btn
|
||||
Element Should Be Visible id=confirm-password-error
|
||||
Element Text Should Contain id=confirm-password-error match
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Complete Setup Flow
|
||||
# ---------------------------------------------------------------------------
|
||||
Complete Setup Flow
|
||||
[Documentation] Fill all setup sections and submit, verifying redirect to main page.
|
||||
Fill Text id=app-name-input AniworldTest
|
||||
Fill Text id=data-dir-input data
|
||||
Fill Text id=anime-directory-input /tmp/aniworld_test_anime
|
||||
Fill Text id=master-password-input ${SETUP_PASSWORD}
|
||||
Fill Text id=confirm-password-input ${SETUP_PASSWORD}
|
||||
# Disable scheduler for tests
|
||||
Uncheck Checkbox id=scheduler-enabled
|
||||
# Submit
|
||||
Click id=setup-submit-btn
|
||||
Wait For Elements State id=search-input visible timeout=10s
|
||||
Page Title Should Contain AniWorld
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Post-Setup Redirect
|
||||
# ---------------------------------------------------------------------------
|
||||
Setup Redirects When Already Configured
|
||||
[Documentation] After setup is complete, visiting /setup should redirect to /.
|
||||
Complete Setup Flow
|
||||
Go To ${BASE_URL}/setup
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
${url}= Get Url
|
||||
Should Not Contain ${url} /setup
|
||||
Reference in New Issue
Block a user