backup
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user