backup
This commit is contained in:
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