mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-05-17 20:50:52 +02:00
Refactor & Complete E2E tests for auth, nav and the password component
This commit is contained in:
parent
d00093a85a
commit
afd020019b
15
tests/EndToEnd/Pages/404_page.robot
Normal file
15
tests/EndToEnd/Pages/404_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in 404 page tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${404 PAGE URL} ${ROOT URL}/404
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
404 Page Should Be Open
|
||||||
|
Location Should Be ${404 PAGE URL}
|
||||||
|
|
||||||
|
Go To 404 Page
|
||||||
|
Go To ${404 PAGE URL}
|
15
tests/EndToEnd/Pages/about_page.robot
Normal file
15
tests/EndToEnd/Pages/about_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in About page tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${ABOUT PAGE URL} ${ROOT URL}/about
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
About Page Should Be Open
|
||||||
|
Location Should Be ${ABOUT PAGE URL}
|
||||||
|
|
||||||
|
Go To About Page
|
||||||
|
Go To ${ABOUT PAGE URL}
|
@ -5,6 +5,7 @@ Library SeleniumLibrary
|
|||||||
Resource ../common.resource
|
Resource ../common.resource
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
|
${EDIT ACCOUNT PAGE URL} ${ROOT URL}/account/1/edit
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Edit Page Should Be Open For Account
|
Edit Page Should Be Open For Account
|
15
tests/EndToEnd/Pages/account_import_page.robot
Normal file
15
tests/EndToEnd/Pages/account_import_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in Accounts import tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${IMPORT ACCOUNTS PAGE URL} ${ROOT URL}/account/import
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Import Accounts Page Should Be Open
|
||||||
|
Location Should Be ${IMPORT ACCOUNTS PAGE URL}
|
||||||
|
|
||||||
|
Go To Import Accounts Page
|
||||||
|
Go Authenticated To ${IMPORT ACCOUNTS PAGE URL}
|
15
tests/EndToEnd/Pages/account_show_qrcode_page.robot
Normal file
15
tests/EndToEnd/Pages/account_show_qrcode_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in Accounts QR code tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${SHOW ACCOUNT QRCODE PAGE URL} ${ROOT URL}/account/1/qrcode
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Show Account Qrcode Page Should Be Open
|
||||||
|
Location Should Be ${SHOW ACCOUNT QRCODE PAGE URL}
|
||||||
|
|
||||||
|
Go To Show Account Qrcode Page
|
||||||
|
Go Authenticated To ${SHOW ACCOUNT QRCODE PAGE URL}
|
@ -10,3 +10,6 @@ ${ACCOUNTS PAGE URL} ${ROOT URL}/accounts
|
|||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Accounts Page Should Be Open
|
Accounts Page Should Be Open
|
||||||
Location Should Be ${ACCOUNTS PAGE URL}
|
Location Should Be ${ACCOUNTS PAGE URL}
|
||||||
|
|
||||||
|
Go To Accounts Page
|
||||||
|
Go Authenticated To ${ACCOUNTS PAGE URL}
|
15
tests/EndToEnd/Pages/autolock_page.robot
Normal file
15
tests/EndToEnd/Pages/autolock_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in autolock tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${AUTOLOCK PAGE URL} ${ROOT URL}/autolock
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Autolock Page Should Be Open
|
||||||
|
Location Should Be ${AUTOLOCK PAGE URL}
|
||||||
|
|
||||||
|
Go To Autolock Page
|
||||||
|
Go To ${AUTOLOCK PAGE URL}
|
14
tests/EndToEnd/Pages/capture_page.robot
Normal file
14
tests/EndToEnd/Pages/capture_page.robot
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in Capture tests.
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${CAPTURE PAGE URL} ${ROOT URL}/capture
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Capture Page Should Be Open
|
||||||
|
Location Should Be ${CAPTURE PAGE URL}
|
||||||
|
|
||||||
|
Go To Capture Page
|
||||||
|
Go Authenticated To ${CAPTURE PAGE URL}
|
15
tests/EndToEnd/Pages/error_page.robot
Normal file
15
tests/EndToEnd/Pages/error_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in About page tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${ERROR PAGE URL} ${ROOT URL}/error
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Error Page Should Be Open
|
||||||
|
Location Should Be ${ERROR PAGE URL}
|
||||||
|
|
||||||
|
Go To Error Page
|
||||||
|
Go To ${ERROR PAGE URL}
|
14
tests/EndToEnd/Pages/group_create_page.robot
Normal file
14
tests/EndToEnd/Pages/group_create_page.robot
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in Group creation tests.
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${CREATE GROUP PAGE URL} ${ROOT URL}/group/create
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Create Group Page Should Be Open
|
||||||
|
Location Should Be ${CREATE GROUP PAGE URL}
|
||||||
|
|
||||||
|
Go To Create Group Page
|
||||||
|
Go Authenticated To ${CREATE GROUP PAGE URL}
|
16
tests/EndToEnd/Pages/group_edit_page.robot
Normal file
16
tests/EndToEnd/Pages/group_edit_page.robot
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in Group edition tests.
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${EDIT GROUP PAGE URL} ${ROOT URL}/group/1/edit
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Edit Page Should Be Open For Group
|
||||||
|
[Arguments] ${group id}
|
||||||
|
Location Should Be ${ROOT URL}/group/${group id}/edit
|
||||||
|
|
||||||
|
Go To Edit Page For Group
|
||||||
|
[Arguments] ${group id}
|
||||||
|
Go Authenticated To ${ROOT URL}/group/${group id}/edit
|
14
tests/EndToEnd/Pages/groups_page.robot
Normal file
14
tests/EndToEnd/Pages/groups_page.robot
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in Groups tests.
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${GROUPS PAGE URL} ${ROOT URL}/groups
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Groups Page Should Be Open
|
||||||
|
Location Should Be ${GROUPS PAGE URL}
|
||||||
|
|
||||||
|
Go To Groups Page
|
||||||
|
Go Authenticated To ${GROUPS PAGE URL}
|
@ -1,6 +1,5 @@
|
|||||||
*** Settings ***
|
*** Settings ***
|
||||||
Documentation A page object to use in Login tests.
|
Documentation A page object to use in Login tests.
|
||||||
...
|
|
||||||
Library SeleniumLibrary
|
Library SeleniumLibrary
|
||||||
Resource ../common.resource
|
Resource ../common.resource
|
||||||
|
|
||||||
@ -12,11 +11,13 @@ ${PASSWORD FIELD} pwdPassword
|
|||||||
${PASSWORD FIELD ERROR} valErrorPassword
|
${PASSWORD FIELD ERROR} valErrorPassword
|
||||||
${LEGACY FORM} frmLegacyLogin
|
${LEGACY FORM} frmLegacyLogin
|
||||||
${SIGN IN BUTTON} btnSignIn
|
${SIGN IN BUTTON} btnSignIn
|
||||||
|
${WEBAUTHN SIGN IN BUTTON} btnContinue
|
||||||
${CONTINUE WITH WEBAUTHN BUTTON} btnContinue
|
${CONTINUE WITH WEBAUTHN BUTTON} btnContinue
|
||||||
${SIGN IN WITH WEBAUTHN LINK} lnkSignWithWebauthn
|
${SIGN IN WITH WEBAUTHN LINK} lnkSignWithWebauthn
|
||||||
${SIGN IN WITH LOGIN PASSWORD LINK} lnkSignWithLegacy
|
${SIGN IN WITH LOGIN PASSWORD LINK} lnkSignWithLegacy
|
||||||
${RECOVER YOUR ACCOUNT LINK} lnkRecoverAccount
|
${RECOVER YOUR ACCOUNT LINK} lnkRecoverAccount
|
||||||
${RESET PASSWORD LINK} lnkResetPwd
|
${RESET PASSWORD LINK} lnkResetPwd
|
||||||
|
${REGISTER LINK} lnkRegister
|
||||||
${PUNCHLINE TEXT} punchline
|
${PUNCHLINE TEXT} punchline
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
@ -39,6 +40,12 @@ Submit Credentials To Legacy Form Login
|
|||||||
Scroll To Bottom
|
Scroll To Bottom
|
||||||
Click Button ${SIGN IN BUTTON}
|
Click Button ${SIGN IN BUTTON}
|
||||||
|
|
||||||
|
Submit Credentials To Webauthn Form Login
|
||||||
|
[Arguments] ${email}
|
||||||
|
Input Text ${EMAIL FIELD} ${email}
|
||||||
|
Scroll To Bottom
|
||||||
|
Click Button ${WEBAUTHN SIGN IN BUTTON}
|
||||||
|
|
||||||
Email Field Should Show An Error
|
Email Field Should Show An Error
|
||||||
Field Should Show An Error ${EMAIL FIELD ERROR}
|
Field Should Show An Error ${EMAIL FIELD ERROR}
|
||||||
|
|
||||||
@ -60,4 +67,4 @@ Webauthn Form Should Be Visible
|
|||||||
Element Should Not Be Visible ${LEGACY FORM}
|
Element Should Not Be Visible ${LEGACY FORM}
|
||||||
|
|
||||||
User Should Be Welcomed
|
User Should Be Welcomed
|
||||||
Element Should Contain ${PUNCHLINE TEXT} ${USERNAME}
|
Element Should Be Visible ${PUNCHLINE TEXT}
|
27
tests/EndToEnd/Pages/password_request_page.robot
Normal file
27
tests/EndToEnd/Pages/password_request_page.robot
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in password recovery tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${PASSWORD REQUEST PAGE URL} ${ROOT URL}/password/request
|
||||||
|
${EMAIL FIELD} emlEmail
|
||||||
|
${EMAIL FIELD ERROR} valErrorEmail
|
||||||
|
${SUBMIT BUTTON} btnSendResetPwd
|
||||||
|
${CANCEL BUTTON} btnCancel
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Password Request Page Should Be Open
|
||||||
|
Location Should Be ${PASSWORD REQUEST PAGE URL}
|
||||||
|
|
||||||
|
Go To Password Request Page
|
||||||
|
Go To ${PASSWORD REQUEST PAGE URL}
|
||||||
|
|
||||||
|
Submit Data To Password Request Form
|
||||||
|
[Arguments] ${email}
|
||||||
|
Input Text ${EMAIL FIELD} ${email}
|
||||||
|
Click Button ${SUBMIT BUTTON}
|
||||||
|
|
||||||
|
Email Field Should Show An Error
|
||||||
|
Field Should Show An Error ${EMAIL FIELD ERROR}
|
39
tests/EndToEnd/Pages/password_reset_page.robot
Normal file
39
tests/EndToEnd/Pages/password_reset_page.robot
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in password recovery tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${PASSWORD RESET PAGE URL} ${ROOT URL}/user/password/reset
|
||||||
|
${EMAIL FIELD} emlEmail
|
||||||
|
${EMAIL FIELD ERROR} valErrorEmail
|
||||||
|
${PASSWORD FIELD} pwdPassword
|
||||||
|
${PASSWORD FIELD ERROR} valErrorPassword
|
||||||
|
${TOKEN FIELD ERROR} valErrorToken
|
||||||
|
${SUBMIT BUTTON} btnSubmit
|
||||||
|
${CONTINUE BUTTON} btnContinue
|
||||||
|
${CANCEL BUTTON} btnCancel
|
||||||
|
${TOGGLE PASSWORD VISIBILITY BUTTON} btnTogglePassword
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Password Reset Page Should Be Open
|
||||||
|
Location Should Be ${PASSWORD RESET PAGE URL}
|
||||||
|
|
||||||
|
Go To Password Reset Page
|
||||||
|
[Arguments] ${email} ${token}
|
||||||
|
Go To ${PASSWORD RESET PAGE URL}?email=${email}&token=${token}
|
||||||
|
|
||||||
|
Submit Data To Password Reset Form
|
||||||
|
[Arguments] ${new password}
|
||||||
|
Input Text ${PASSWORD FIELD} ${new password}
|
||||||
|
Click Button ${SUBMIT BUTTON}
|
||||||
|
|
||||||
|
Email Field Should Show An Error
|
||||||
|
Field Should Show An Error ${EMAIL FIELD ERROR}
|
||||||
|
|
||||||
|
New Password Field Should Show An Error
|
||||||
|
Field Should Show An Error ${PASSWORD FIELD ERROR}
|
||||||
|
|
||||||
|
Token Field Should Show An Error
|
||||||
|
Field Should Show An Error ${TOKEN FIELD ERROR}
|
@ -12,11 +12,11 @@ ${EMAIL FIELD} emlEmail
|
|||||||
${EMAIL FIELD ERROR} valErrorEmail
|
${EMAIL FIELD ERROR} valErrorEmail
|
||||||
${PASSWORD FIELD} pwdPassword
|
${PASSWORD FIELD} pwdPassword
|
||||||
${PASSWORD FIELD ERROR} valErrorPassword
|
${PASSWORD FIELD ERROR} valErrorPassword
|
||||||
${PASSWORD CONFIRMATION FIELD} pwdPassword_confirmation
|
|
||||||
${REGISTER BUTTON} btnRegister
|
${REGISTER BUTTON} btnRegister
|
||||||
${REGISTER NEW DEVICE BUTTON} btnRegisterNewDevice
|
${REGISTER NEW DEVICE BUTTON} btnRegisterNewDevice
|
||||||
${MAYBE LATER BUTTON} btnMaybeLater
|
${MAYBE LATER BUTTON} btnMaybeLater
|
||||||
${SIGN IN LINK} lnkSignIn
|
${SIGN IN LINK} lnkSignIn
|
||||||
|
${TOGGLE PASSWORD VISIBILITY BUTTON} btnTogglePassword
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Go To Register Page
|
Go To Register Page
|
||||||
@ -26,11 +26,10 @@ Register Page Should Be Open
|
|||||||
Location Should Be ${REGISTER PAGE URL}
|
Location Should Be ${REGISTER PAGE URL}
|
||||||
|
|
||||||
Submit User Data To Registration Form
|
Submit User Data To Registration Form
|
||||||
[Arguments] ${username} ${email} ${password} ${password confirmation}
|
[Arguments] ${username} ${email} ${password}
|
||||||
Input Text ${USERNAME FIELD} ${username}
|
Input Text ${USERNAME FIELD} ${username}
|
||||||
Input Text ${EMAIL FIELD} ${email}
|
Input Text ${EMAIL FIELD} ${email}
|
||||||
Input Text ${PASSWORD FIELD} ${password}
|
Input Text ${PASSWORD FIELD} ${password}
|
||||||
Input Text ${PASSWORD CONFIRMATION FIELD} ${password confirmation}
|
|
||||||
Scroll To Bottom
|
Scroll To Bottom
|
||||||
Click Button ${REGISTER BUTTON}
|
Click Button ${REGISTER BUTTON}
|
||||||
|
|
||||||
@ -44,4 +43,4 @@ Password Field Should Show An Error
|
|||||||
Field Should Show An Error ${PASSWORD FIELD ERROR}
|
Field Should Show An Error ${PASSWORD FIELD ERROR}
|
||||||
|
|
||||||
Postpone Webauthn Registration
|
Postpone Webauthn Registration
|
||||||
Click Element ${MAYBE LATER BUTTON}
|
Click Link ${MAYBE LATER BUTTON}
|
@ -23,3 +23,4 @@ Delete User Account
|
|||||||
Input Text ${PASSWORD FIELD FOR DELETE} ${PASSWORD}
|
Input Text ${PASSWORD FIELD FOR DELETE} ${PASSWORD}
|
||||||
Click Button ${DELETE YOUR ACCOUNT BUTTON}
|
Click Button ${DELETE YOUR ACCOUNT BUTTON}
|
||||||
Handle Alert
|
Handle Alert
|
||||||
|
Wait Until Location Is Not ${ROOT URL}/settings/account
|
15
tests/EndToEnd/Pages/settings_oauth_pat_create_page.robot
Normal file
15
tests/EndToEnd/Pages/settings_oauth_pat_create_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in OAuth settings tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${CREATE OAUTH PAT SETTINGS PAGE URL} ${ROOT URL}/settings/oauth/pat/create
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Create OAuth Pat Settings Page Should Be Open
|
||||||
|
Location Should Be ${CREATE OAUTH PAT SETTINGS PAGE URL}
|
||||||
|
|
||||||
|
Go To Create OAuth Pat Settings Page
|
||||||
|
Go Authenticated To ${CREATE OAUTH PAT SETTINGS PAGE URL}
|
15
tests/EndToEnd/Pages/settings_webauthn_edit_page.robot
Normal file
15
tests/EndToEnd/Pages/settings_webauthn_edit_page.robot
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in WebAuthn rename device tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${RENAME WEBAUTHN DEVICE SETTINGS PAGE URL} ${ROOT URL}/settings/webauthn/1/edit
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Rename Webauthn Device Settings Page Should Be Open
|
||||||
|
Location Should Be ${RENAME WEBAUTHN DEVICE SETTINGS PAGE URL}
|
||||||
|
|
||||||
|
Go To Rename Webauthn Device Settings Page
|
||||||
|
Go Authenticated To ${RENAME WEBAUTHN DEVICE SETTINGS PAGE URL}
|
27
tests/EndToEnd/Pages/webauthn_lost_page.robot
Normal file
27
tests/EndToEnd/Pages/webauthn_lost_page.robot
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in webauthn recovery tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${WEBAUTHN LOST PAGE URL} ${ROOT URL}/webauthn/lost
|
||||||
|
${EMAIL FIELD} emlEmail
|
||||||
|
${EMAIL FIELD ERROR} valErrorEmail
|
||||||
|
${SUBMIT BUTTON} btnSubmit
|
||||||
|
${CANCEL BUTTON} btnCancel
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Webauthn Device Lost Page Should Be Open
|
||||||
|
Location Should Be ${WEBAUTHN LOST PAGE URL}
|
||||||
|
|
||||||
|
Go To Webauthn Device Lost Page
|
||||||
|
Go To ${WEBAUTHN LOST PAGE URL}
|
||||||
|
|
||||||
|
Submit Data To Webauthn Lost Form
|
||||||
|
[Arguments] ${email}
|
||||||
|
Input Text ${EMAIL FIELD} ${email}
|
||||||
|
Click Button ${SUBMIT BUTTON}
|
||||||
|
|
||||||
|
Email Field Should Show An Error
|
||||||
|
Field Should Show An Error ${EMAIL FIELD ERROR}
|
30
tests/EndToEnd/Pages/webauthn_recover_page.robot
Normal file
30
tests/EndToEnd/Pages/webauthn_recover_page.robot
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A page object to use in webauthn recovery tests.
|
||||||
|
...
|
||||||
|
Library SeleniumLibrary
|
||||||
|
Resource ../common.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${WEBAUTHN RECOVER PAGE URL} ${ROOT URL}/webauthn/recover
|
||||||
|
${PASSWORD FIELD} pwdPassword
|
||||||
|
${PASSWORD FIELD ERROR} valErrorPassword
|
||||||
|
${REVOKE ALL CHECKBOX} revokeAll
|
||||||
|
${SUBMIT BUTTON} btnRecover
|
||||||
|
${CANCEL BUTTON} btnCancel
|
||||||
|
${RESET PASSWORD LINK} lnkResetPwd
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Webauthn Recover Page Should Be Open
|
||||||
|
Location Should Be ${WEBAUTHN RECOVER PAGE URL}
|
||||||
|
|
||||||
|
Go To Webauthn Recover Page
|
||||||
|
[Arguments] ${email} ${token}
|
||||||
|
Go To ${WEBAUTHN RECOVER PAGE URL}?email=${email}&token=${token}
|
||||||
|
|
||||||
|
Submit Data To Webauthn Recover Form
|
||||||
|
[Arguments] ${password}
|
||||||
|
Input Text ${PASSWORD FIELD} ${password}
|
||||||
|
Click Button ${SUBMIT BUTTON}
|
||||||
|
|
||||||
|
Password Field Should Show An Error
|
||||||
|
Field Should Show An Error ${PASSWORD FIELD ERROR}
|
@ -3,8 +3,10 @@ Documentation A resource file for authentication tests.
|
|||||||
Resource ../../common.resource
|
Resource ../../common.resource
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${VALID EMAIL CASED} TESTING@2fauth.app
|
${NEW USER NAME} bob
|
||||||
${VALID PASSWORD CONFIRMATION} password
|
${UNREGISTERED EMAIL} unregistered@2fauth.app
|
||||||
|
${VALID ADMIN EMAIL CASED} TESTINGADMIN@2fauth.app
|
||||||
|
${VALID USER EMAIL CASED} TESTINGUSER@2fauth.app
|
||||||
|
|
||||||
${INVALID USERNAME TOO LONG} veryLongUsernameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
${INVALID USERNAME TOO LONG} veryLongUsernameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||||
${INVALID EMAIL MALFORMED} emailWithNoAt
|
${INVALID EMAIL MALFORMED} emailWithNoAt
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite to check available links on the login page.
|
|
||||||
Suite Setup Available Links Suite Setup
|
|
||||||
Suite Teardown Close All Browsers
|
|
||||||
Resource ../../Pages/login_page.robot
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Reset Link Is Visible
|
|
||||||
Element Should Be Visible ${RESET PASSWORD LINK}
|
|
||||||
|
|
||||||
Webauthn login Link Is Visible
|
|
||||||
Element Should Be Visible ${SIGN IN WITH WEBAUTHN LINK}
|
|
||||||
|
|
||||||
Legacy login Link Is Visible
|
|
||||||
Show Webauthn Form
|
|
||||||
Webauthn Form Should Be Visible
|
|
||||||
Element Should Be Visible ${SIGN IN WITH LOGIN PASSWORD LINK}
|
|
||||||
|
|
||||||
Recover Account Link Is Visible
|
|
||||||
Show Webauthn Form
|
|
||||||
Webauthn Form Should Be Visible
|
|
||||||
Element Should Be Visible ${RECOVER YOUR ACCOUNT LINK}
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
Available Links Suite Setup
|
|
||||||
Open Blank Browser
|
|
||||||
Go To Legacy Login Page
|
|
||||||
Legacy Form Should Be Visible
|
|
@ -1,37 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite containing tests related to invalid login.
|
|
||||||
Suite Setup Open Blank Browser
|
|
||||||
Suite Teardown Close All Browsers
|
|
||||||
Test Setup Run keywords
|
|
||||||
... Go To Legacy Login Page
|
|
||||||
... AND Login Page Should Be Open
|
|
||||||
... AND Legacy Form Should Be Visible
|
|
||||||
Resource ../../Pages/login_page.robot
|
|
||||||
Resource authentication.resource
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Invalid Email
|
|
||||||
[Template] Login With Invalid Email Should Fail
|
|
||||||
${EMPTY} ${PASSWORD}
|
|
||||||
${INVALID EMAIL MALFORMED} ${PASSWORD}
|
|
||||||
${INVALID EMAIL DOES NOT EXIST} ${PASSWORD}
|
|
||||||
|
|
||||||
Missing Password
|
|
||||||
Submit Credentials To Legacy Form Login ${EMAIL} ${EMPTY}
|
|
||||||
Page Should Remain Login Page
|
|
||||||
login_page.Password Field Should Show An Error
|
|
||||||
|
|
||||||
Invalid Password
|
|
||||||
Submit Credentials To Legacy Form Login ${EMAIL} ${INVALID PASSWORD}
|
|
||||||
Page Should Remain Login Page
|
|
||||||
An Error Notification Should Appear
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
Login With Invalid Email Should Fail
|
|
||||||
[Arguments] ${email} ${password}
|
|
||||||
Submit Credentials To Legacy Form Login ${email} ${password}
|
|
||||||
Location Should Be ${LOGIN PAGE URL}
|
|
||||||
login_page.Email Field Should Show An Error
|
|
||||||
|
|
||||||
Page Should Remain Login Page
|
|
||||||
Location Should Be ${LOGIN PAGE URL}
|
|
@ -1,59 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite containing tests related to invalid registration.
|
|
||||||
Suite Setup Register Suite Setup
|
|
||||||
Suite Teardown Register Suite Teardown
|
|
||||||
Test Setup Register Test Setup
|
|
||||||
Resource ../../Pages/register_page.robot
|
|
||||||
Resource ../../Pages/accounts_page.robot
|
|
||||||
Resource authentication.resource
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Invalid Email
|
|
||||||
[Template] Registering With Invalid Email Should Fail
|
|
||||||
${EMPTY}
|
|
||||||
${INVALID EMAIL MALFORMED}
|
|
||||||
${INVALID EMAIL TOO LONG}
|
|
||||||
|
|
||||||
Invalid Username
|
|
||||||
[Template] Registering With Invalid Username Should Fail
|
|
||||||
${EMPTY}
|
|
||||||
${INVALID USERNAME TOO LONG}
|
|
||||||
|
|
||||||
Invalid Password
|
|
||||||
[Template] Registering With Invalid Passwords Should Fail
|
|
||||||
${EMPTY} ${EMPTY}
|
|
||||||
${PASSWORD} ${EMPTY}
|
|
||||||
${PASSWORD} ${INVALID PASSWORD}
|
|
||||||
${INVALID PASSWORD TOO SHORT} ${INVALID PASSWORD TOO SHORT}
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
Registering With Invalid Username Should Fail
|
|
||||||
[Arguments] ${bad username}
|
|
||||||
Submit User Data To Registration Form ${bad username} ${EMAIL} ${PASSWORD} ${PASSWORD}
|
|
||||||
register_page.Username Field Should Show An Error
|
|
||||||
|
|
||||||
Registering With Invalid Email Should Fail
|
|
||||||
[Arguments] ${bad email}
|
|
||||||
Submit User Data To Registration Form ${USERNAME} ${bad email} ${PASSWORD} ${PASSWORD}
|
|
||||||
register_page.Email Field Should Show An Error
|
|
||||||
|
|
||||||
Registering With Invalid Passwords Should Fail
|
|
||||||
[Arguments] ${bad password} ${bad password confirmation}
|
|
||||||
Submit User Data To Registration Form ${USERNAME} ${EMAIL} ${bad password} ${bad password confirmation}
|
|
||||||
register_page.Password Field Should Show An Error
|
|
||||||
|
|
||||||
User should be asked To Register A Webauthn Device
|
|
||||||
Page Should Contain Element ${REGISTER NEW DEVICE BUTTON}
|
|
||||||
Page Should Contain Element ${MAYBE LATER BUTTON}
|
|
||||||
|
|
||||||
Register Suite Setup
|
|
||||||
Open Blank Browser
|
|
||||||
Play Delete User Account Workflow
|
|
||||||
|
|
||||||
Register Suite Teardown
|
|
||||||
Close All Browsers
|
|
||||||
Play Register New User Workflow
|
|
||||||
|
|
||||||
Register Test Setup
|
|
||||||
Go To Register Page
|
|
||||||
Location Should Be ${REGISTER PAGE URL}
|
|
48
tests/EndToEnd/Tests/Auth/legacy_login.robot
Normal file
48
tests/EndToEnd/Tests/Auth/legacy_login.robot
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to legacy login.
|
||||||
|
Suite Setup Run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Test Setup Go To Legacy Login Page
|
||||||
|
Resource ../../Pages/login_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Email Should Be Rejected
|
||||||
|
[Template] Email Submit Should Fail
|
||||||
|
${EMPTY} ${PASSWORD}
|
||||||
|
${INVALID EMAIL MALFORMED} ${PASSWORD}
|
||||||
|
${INVALID EMAIL DOES NOT EXIST} ${PASSWORD}
|
||||||
|
|
||||||
|
Missing Password Should Be Rejected
|
||||||
|
Submit Credentials To Legacy Form Login ${ADMIN EMAIL} ${EMPTY}
|
||||||
|
Login Page Should Be Open
|
||||||
|
login_page.Password Field Should Show An Error
|
||||||
|
|
||||||
|
Invalid Password Should Be Rejected
|
||||||
|
Submit Credentials To Legacy Form Login ${ADMIN EMAIL} ${INVALID PASSWORD}
|
||||||
|
Login Page Should Be Open
|
||||||
|
An Error Notification Should Appear
|
||||||
|
|
||||||
|
Password Should Not Be Readable
|
||||||
|
Input Text ${PASSWORD FIELD} ${PASSWORD}
|
||||||
|
Element Attribute Value Should Be ${PASSWORD FIELD} type password
|
||||||
|
|
||||||
|
Password Should Be Readable
|
||||||
|
Input Text ${PASSWORD FIELD} ${PASSWORD}
|
||||||
|
Click Element ${TOGGLE PASSWORD VISIBILITY BUTTON}
|
||||||
|
Element Attribute Value Should Be ${PASSWORD FIELD} type text
|
||||||
|
|
||||||
|
Valid Login
|
||||||
|
Login Page Should Be Open
|
||||||
|
User Should Be Welcomed
|
||||||
|
Submit Credentials To Legacy Form Login ${ADMIN EMAIL} ${PASSWORD}
|
||||||
|
Wait Until Location Is ${ACCOUNTS PAGE URL} 2s
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Email Submit Should Fail
|
||||||
|
[Arguments] ${email} ${password}
|
||||||
|
Submit Credentials To Legacy Form Login ${email} ${password}
|
||||||
|
Location Should Be ${LOGIN PAGE URL}
|
||||||
|
login_page.Email Field Should Show An Error
|
@ -1,14 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite containing tests related to maximum user registration.
|
|
||||||
Suite Setup Open Blank Browser
|
|
||||||
Suite Teardown Close All Browsers
|
|
||||||
Resource ../../Pages/register_page.robot
|
|
||||||
Resource ../../Pages/accounts_page.robot
|
|
||||||
Resource authentication.resource
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
A User Already Exists
|
|
||||||
Go To Register Page
|
|
||||||
Location Should Be ${REGISTER PAGE URL}
|
|
||||||
Submit User Data To Registration Form ${USERNAME} ${EMAIL} ${PASSWORD} ${PASSWORD}
|
|
||||||
An Error Notification Should Appear
|
|
35
tests/EndToEnd/Tests/Auth/password_request.robot
Normal file
35
tests/EndToEnd/Tests/Auth/password_request.robot
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to password request.
|
||||||
|
Suite Setup run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
Test Setup Go To Password Request Page
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/password_request_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Email Is Rejected
|
||||||
|
[Template] Email Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${UNREGISTERED EMAIL}
|
||||||
|
${INVALID EMAIL MALFORMED}
|
||||||
|
|
||||||
|
Password Request Is Submitted Sucessfully
|
||||||
|
Submit Data To Password Request Form ${ADMIN EMAIL}
|
||||||
|
Wait Until Element Is Visible css:#vueNotification .is-success 30s
|
||||||
|
Password Request Page Should Be Open
|
||||||
|
|
||||||
|
New Request While Pending One Is Rejected
|
||||||
|
Email Submit Should Fail ${ADMIN EMAIL}
|
||||||
|
|
||||||
|
Request Form Can Be Quit
|
||||||
|
Click Link ${CANCEL BUTTON}
|
||||||
|
Login Page Should Be Open
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Email Submit Should Fail
|
||||||
|
[Arguments] ${bad email}
|
||||||
|
Submit Data To Password Request Form ${bad email}
|
||||||
|
password_request_page.Email Field Should Show An Error
|
||||||
|
Password Request Page Should Be Open
|
65
tests/EndToEnd/Tests/Auth/password_reset.robot
Normal file
65
tests/EndToEnd/Tests/Auth/password_reset.robot
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to password reset.
|
||||||
|
Suite Setup run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/password_reset_page.robot
|
||||||
|
Resource ../../Pages/accounts_page.robot
|
||||||
|
Resource ../../Pages/login_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${NEW PASSWORD} new_password
|
||||||
|
${INVALID NEW PASSWORD} new
|
||||||
|
${TOKEN} token
|
||||||
|
${INVALID TOKEN} token
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Email Is Rejected
|
||||||
|
[Template] Email Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${UNREGISTERED EMAIL}
|
||||||
|
${INVALID EMAIL MALFORMED}
|
||||||
|
|
||||||
|
Invalid Password Is Rejected
|
||||||
|
[Template] Password Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${INVALID NEW PASSWORD}
|
||||||
|
|
||||||
|
No Token Is Rejected
|
||||||
|
Go To Password Reset Page ${ADMIN EMAIL} ${EMPTY}
|
||||||
|
Submit Data To Password Reset Form ${NEW PASSWORD}
|
||||||
|
Token Field Should Show An Error
|
||||||
|
|
||||||
|
Invalid Token Is Rejected
|
||||||
|
Go To Password Reset Page ${ADMIN EMAIL} ${INVALID TOKEN}
|
||||||
|
Submit Data To Password Reset Form ${NEW PASSWORD}
|
||||||
|
password_reset_page.Email Field Should Show An Error
|
||||||
|
|
||||||
|
Password Reset Is Submitted Sucessfully
|
||||||
|
Go To Password Reset Page ${ADMIN EMAIL} ${TOKEN}
|
||||||
|
Element Attribute Value Should Be emlEmail value ${ADMIN EMAIL}
|
||||||
|
# Submit Data To Password Reset Form ${NEW PASSWORD}
|
||||||
|
# Wait Until Element Is Visible css:#vueNotification .is-success 30s
|
||||||
|
# Wait Until Element Is Visible ${CONTINUE BUTTON}
|
||||||
|
# Click Link ${CONTINUE BUTTON}
|
||||||
|
# Accounts Page Should Be Open
|
||||||
|
|
||||||
|
Reset Form Can Be Quit
|
||||||
|
Go To Password Reset Page ${ADMIN EMAIL} ${TOKEN}
|
||||||
|
Click Link ${CANCEL BUTTON}
|
||||||
|
Login Page Should Be Open
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Email Submit Should Fail
|
||||||
|
[Arguments] ${bad email}
|
||||||
|
Go To Password Reset Page ${bad email} ${TOKEN}
|
||||||
|
Submit Data To Password Reset Form ${NEW PASSWORD}
|
||||||
|
password_reset_page.Email Field Should Show An Error
|
||||||
|
|
||||||
|
Password Submit Should Fail
|
||||||
|
[Arguments] ${bad password}
|
||||||
|
Go To Password Reset Page ${ADMIN EMAIL} ${TOKEN}
|
||||||
|
Submit Data To Password Reset Form ${bad password}
|
||||||
|
password_reset_page.New Password Field Should Show An Error
|
58
tests/EndToEnd/Tests/Auth/registration.robot
Normal file
58
tests/EndToEnd/Tests/Auth/registration.robot
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to invalid registration.
|
||||||
|
Suite Setup run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
# We force the register page to reload at every test to prevent fields set with
|
||||||
|
# ${EMPTY} to fail
|
||||||
|
Test Setup Go To Register Page
|
||||||
|
Suite Teardown run Keywords
|
||||||
|
... Play Delete Current User Account Workflow
|
||||||
|
... AND Close All Browsers
|
||||||
|
Resource ../../Pages/register_page.robot
|
||||||
|
Resource ../../Pages/start_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Username Should Be Rejected
|
||||||
|
[Template] Username Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${INVALID USERNAME TOO LONG}
|
||||||
|
|
||||||
|
Invalid Email Should Be Rejected
|
||||||
|
[Template] Email Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${INVALID EMAIL MALFORMED}
|
||||||
|
${INVALID EMAIL TOO LONG}
|
||||||
|
|
||||||
|
Invalid Password Should Be Rejected
|
||||||
|
[Template] Password Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${INVALID PASSWORD TOO SHORT}
|
||||||
|
|
||||||
|
Registration Without Webauthn Device Should Succeed
|
||||||
|
Register Page Should Be Open
|
||||||
|
Submit User Data To Registration Form ${NEW USER NAME} ${UNREGISTERED EMAIL} ${PASSWORD}
|
||||||
|
User Should Be Asked To Register A Webauthn Device Or Postpone
|
||||||
|
Postpone Webauthn Registration
|
||||||
|
Wait Until Location Is ${START PAGE URL}
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Username Submit Should Fail
|
||||||
|
[Arguments] ${bad username}
|
||||||
|
Submit User Data To Registration Form ${bad username} ${UNREGISTERED EMAIL} ${PASSWORD}
|
||||||
|
register_page.Username Field Should Show An Error
|
||||||
|
|
||||||
|
Email Submit Should Fail
|
||||||
|
[Arguments] ${bad email}
|
||||||
|
Submit User Data To Registration Form ${NEW USER NAME} ${bad email} ${PASSWORD}
|
||||||
|
register_page.Email Field Should Show An Error
|
||||||
|
|
||||||
|
Password Submit Should Fail
|
||||||
|
[Arguments] ${bad password}
|
||||||
|
Submit User Data To Registration Form ${NEW USER NAME} ${UNREGISTERED EMAIL} ${bad password}
|
||||||
|
register_page.Password Field Should Show An Error
|
||||||
|
|
||||||
|
User Should Be Asked To Register A Webauthn Device Or Postpone
|
||||||
|
Wait Until Page Contains Element ${REGISTER NEW DEVICE BUTTON}
|
||||||
|
Wait Until Page Contains Element ${MAYBE LATER BUTTON}
|
@ -1,15 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite containing tests related to valid login.
|
|
||||||
Suite Setup Open Blank Browser
|
|
||||||
Suite Teardown Close All Browsers
|
|
||||||
Resource ../../Pages/login_page.robot
|
|
||||||
Resource authentication.resource
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Valid Login
|
|
||||||
Delete All Cookies
|
|
||||||
Go To Legacy Login Page
|
|
||||||
Login Page Should Be Open
|
|
||||||
User Should Be Welcomed
|
|
||||||
Submit Credentials To Legacy Form Login ${EMAIL} ${PASSWORD}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite containing tests related to valid registration.
|
|
||||||
Suite Setup Open Blank Browser
|
|
||||||
Suite Teardown Close All Browsers
|
|
||||||
Resource ../../Pages/register_page.robot
|
|
||||||
Resource ../../Pages/accounts_page.robot
|
|
||||||
Resource authentication.resource
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Valid Registration Without Webauthn Device
|
|
||||||
Play Delete User Account Workflow
|
|
||||||
Go To Register Page
|
|
||||||
Register Page Should Be Open
|
|
||||||
Submit User Data To Registration Form ${USERNAME} ${EMAIL} ${PASSWORD} ${PASSWORD}
|
|
||||||
User Should Be Asked To Register A Webauthn Device Or Postpone
|
|
||||||
Postpone Webauthn Registration
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
User Should Be Asked To Register A Webauthn Device Or Postpone
|
|
||||||
Page Should Contain Element ${REGISTER NEW DEVICE BUTTON}
|
|
||||||
Page Should Contain Element ${MAYBE LATER BUTTON}
|
|
23
tests/EndToEnd/Tests/Auth/webauthn_login.robot
Normal file
23
tests/EndToEnd/Tests/Auth/webauthn_login.robot
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to webauthn login.
|
||||||
|
Suite Setup Run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Test Setup Go To Webauthn Login Page
|
||||||
|
Resource ../../Pages/login_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Email Should Be Rejected
|
||||||
|
[Template] Email Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${INVALID EMAIL MALFORMED}
|
||||||
|
${INVALID EMAIL DOES NOT EXIST}
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Email Submit Should Fail
|
||||||
|
[Arguments] ${email}
|
||||||
|
Submit Credentials To Webauthn Form Login ${email}
|
||||||
|
Location Should Be ${LOGIN PAGE URL}
|
||||||
|
login_page.Email Field Should Show An Error
|
35
tests/EndToEnd/Tests/Auth/webauthn_lost.robot
Normal file
35
tests/EndToEnd/Tests/Auth/webauthn_lost.robot
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to webauthn device lost.
|
||||||
|
Suite Setup run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
Test Setup Go To Webauthn Device Lost Page
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/webauthn_lost_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Email Should Be Rejected
|
||||||
|
[Template] Email Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${UNREGISTERED EMAIL}
|
||||||
|
${INVALID EMAIL MALFORMED}
|
||||||
|
|
||||||
|
Webauthn Lost Is Submitted Sucessfully
|
||||||
|
Submit Data To Webauthn Lost Form ${ADMIN EMAIL}
|
||||||
|
Wait Until Element Is Visible css:#vueNotification .is-success 30s
|
||||||
|
Webauthn Device Lost Page Should Be Open
|
||||||
|
|
||||||
|
New Request While Pending One Is Rejected
|
||||||
|
Email Submit Should Fail ${ADMIN EMAIL}
|
||||||
|
|
||||||
|
Webauthn Lost Form Can Be Quit
|
||||||
|
Click Link ${CANCEL BUTTON}
|
||||||
|
Login Page Should Be Open
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Email Submit Should Fail
|
||||||
|
[Arguments] ${bad email}
|
||||||
|
Submit Data To Webauthn Lost Form ${bad email}
|
||||||
|
webauthn_lost_page.Email Field Should Show An Error
|
||||||
|
Webauthn Device Lost Page Should Be Open
|
56
tests/EndToEnd/Tests/Auth/webauthn_recover.robot
Normal file
56
tests/EndToEnd/Tests/Auth/webauthn_recover.robot
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to webauthn account recover.
|
||||||
|
Suite Setup run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
# ... AND Declare Webauthn Device Lost And Come Back
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/webauthn_recover_page.robot
|
||||||
|
Resource ../../Pages/webauthn_lost_page.robot
|
||||||
|
Resource ../../Pages/login_page.robot
|
||||||
|
Resource authentication.resource
|
||||||
|
Resource ../../Pages/password_request_page.robot
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${TOKEN} token
|
||||||
|
${INVALID TOKEN} token
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Invalid Token Should Be Rejected
|
||||||
|
[Template] Token Submit Should Fail
|
||||||
|
${EMPTY}
|
||||||
|
${INVALID TOKEN}
|
||||||
|
|
||||||
|
# Invalid Password Is Rejected
|
||||||
|
# [Template] Password Submit Should Fail
|
||||||
|
# ${EMPTY}
|
||||||
|
# ${INVALID PASSWORD}
|
||||||
|
|
||||||
|
Reset Passwork Link Should Be Visible
|
||||||
|
Go To Webauthn Recover Page \ \
|
||||||
|
Element Should Be Visible ${RESET PASSWORD LINK}
|
||||||
|
Click Link ${RESET PASSWORD LINK}
|
||||||
|
Password Request Page Should Be Open
|
||||||
|
|
||||||
|
Webauthn Recover Form Can Be Quit
|
||||||
|
Go To Webauthn Recover Page \ \
|
||||||
|
Click Link ${CANCEL BUTTON}
|
||||||
|
Login Page Should Be Open
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Token Submit Should Fail
|
||||||
|
[Arguments] ${bad token}
|
||||||
|
Go To Webauthn Recover Page ${ADMIN EMAIL} ${bad token}
|
||||||
|
Submit Data To Webauthn Recover Form ${PASSWORD}
|
||||||
|
An Error Notification Should Appear
|
||||||
|
|
||||||
|
Password Submit Should Fail
|
||||||
|
[Arguments] ${bad password}
|
||||||
|
Go To Webauthn Recover Page ${ADMIN EMAIL} ${TOKEN}
|
||||||
|
Submit Data To Webauthn Recover Form ${bad password}
|
||||||
|
webauthn_recover_page.Password Field Should Show An Error
|
||||||
|
|
||||||
|
Declare Webauthn Device Lost And Come Back
|
||||||
|
Go To Webauthn Device Lost Page
|
||||||
|
Submit Data To Webauthn Lost Form ${ADMIN EMAIL}
|
||||||
|
Go To Webauthn Recover Page ${ADMIN EMAIL} ${TOKEN}
|
78
tests/EndToEnd/Tests/Components/password_field.robot
Normal file
78
tests/EndToEnd/Tests/Components/password_field.robot
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to password field component.
|
||||||
|
Suite Setup run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Go To Register Page
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/register_page.robot
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${VALIDATION CSS CLASS} is-dot
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Password Field Min Length Is Validated
|
||||||
|
Input Text ${PASSWORD FIELD} longEnough
|
||||||
|
Validation Mark Is On valPwdIsLongEnough
|
||||||
|
|
||||||
|
Password Field Min Length Is Not Validated
|
||||||
|
Input Text ${PASSWORD FIELD} short
|
||||||
|
Validation Mark Is Off valPwdIsLongEnough
|
||||||
|
|
||||||
|
Password Field Has Lower Case Is Validated
|
||||||
|
Input Text ${PASSWORD FIELD} lowercase
|
||||||
|
Validation Mark Is On valPwdHasLowerCase
|
||||||
|
|
||||||
|
Password Field Has Lower Case Is Not Validated
|
||||||
|
Input Text ${PASSWORD FIELD} NOTLOWERCASE
|
||||||
|
Validation Mark Is Off valPwdHasLowerCase
|
||||||
|
|
||||||
|
Password Field Has Upper Case Is Validated
|
||||||
|
Input Text ${PASSWORD FIELD} UPPERCASE
|
||||||
|
Validation Mark Is On valPwdHasUpperCase
|
||||||
|
|
||||||
|
Password Field Has Upper Case Is Not Validated
|
||||||
|
Input Text ${PASSWORD FIELD} lowercase
|
||||||
|
Validation Mark Is Off valPwdHasUpperCase
|
||||||
|
|
||||||
|
Password Field Has Special Char Is Validated
|
||||||
|
Input Text ${PASSWORD FIELD} $p€ci@1ch@r
|
||||||
|
Validation Mark Is On valPwdHasSpecialChar
|
||||||
|
|
||||||
|
Password Field Has Special Char Is Not Validated
|
||||||
|
Input Text ${PASSWORD FIELD} nospecialchar
|
||||||
|
Validation Mark Is Off valPwdHasSpecialChar
|
||||||
|
|
||||||
|
Password Field Has Number Is Validated
|
||||||
|
Input Text ${PASSWORD FIELD} p4ssw0rd
|
||||||
|
Validation Mark Is On valPwdHasNumber
|
||||||
|
|
||||||
|
Password Field Has Number Is Not Validated
|
||||||
|
Input Text ${PASSWORD FIELD} password
|
||||||
|
Validation Mark Is Off valPwdHasNumber
|
||||||
|
|
||||||
|
Password Field Validates All Rules
|
||||||
|
Input Text ${PASSWORD FIELD} Pa$$w0rD
|
||||||
|
Validation Mark Is On valPwdIsLongEnough
|
||||||
|
Validation Mark Is On valPwdHasLowerCase
|
||||||
|
Validation Mark Is On valPwdHasUpperCase
|
||||||
|
Validation Mark Is On valPwdHasSpecialChar
|
||||||
|
Validation Mark Is On valPwdHasNumber
|
||||||
|
|
||||||
|
Password Should Not Be Readable
|
||||||
|
Input Text ${PASSWORD FIELD} Pa$$w0rD
|
||||||
|
Element Attribute Value Should Be ${PASSWORD FIELD} type password
|
||||||
|
|
||||||
|
Password Should Be Readable
|
||||||
|
Input Text ${PASSWORD FIELD} Pa$$w0rD
|
||||||
|
Click Element ${TOGGLE PASSWORD VISIBILITY BUTTON}
|
||||||
|
Element Attribute Value Should Be ${PASSWORD FIELD} type text
|
||||||
|
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Validation Mark Is On
|
||||||
|
[Arguments] ${element}
|
||||||
|
Element Should Have Class ${element} ${VALIDATION CSS CLASS}
|
||||||
|
|
||||||
|
Validation Mark Is Off
|
||||||
|
[Arguments] ${element}
|
||||||
|
Element Should Not Have Class ${element} ${VALIDATION CSS CLASS}
|
46
tests/EndToEnd/Tests/Navigation/available_links.robot
Normal file
46
tests/EndToEnd/Tests/Navigation/available_links.robot
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite to check links availability.
|
||||||
|
Suite Setup Run keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Go To Legacy Login Page
|
||||||
|
... AND Legacy Form Should Be Visible
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/login_page.robot
|
||||||
|
Resource ../../Pages/register_page.robot
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
|
||||||
|
### LEGACY LOGIN PAGE LINKS ###
|
||||||
|
|
||||||
|
Reset Link Is Visible
|
||||||
|
Element Should Be Visible ${RESET PASSWORD LINK}
|
||||||
|
|
||||||
|
Webauthn login Link Is Visible
|
||||||
|
Element Should Be Visible ${SIGN IN WITH WEBAUTHN LINK}
|
||||||
|
|
||||||
|
Register Link Is Visible
|
||||||
|
Element Should Be Visible ${REGISTER LINK}
|
||||||
|
|
||||||
|
### / LEGACY LOGIN PAGE LINKS ###
|
||||||
|
|
||||||
|
### WEBAUTHN PAGE LINKS ###
|
||||||
|
|
||||||
|
Legacy login Link Is Visible
|
||||||
|
Show Webauthn Form
|
||||||
|
Webauthn Form Should Be Visible
|
||||||
|
Element Should Be Visible ${SIGN IN WITH LOGIN PASSWORD LINK}
|
||||||
|
|
||||||
|
Webauthn Recover Account Link Is Visible
|
||||||
|
Show Webauthn Form
|
||||||
|
Webauthn Form Should Be Visible
|
||||||
|
Element Should Be Visible ${RECOVER YOUR ACCOUNT LINK}
|
||||||
|
|
||||||
|
### / WEBAUTHN PAGE LINKS ###
|
||||||
|
|
||||||
|
### REGISTER PAGE LINKS ###
|
||||||
|
|
||||||
|
Sign In Link Is Visible
|
||||||
|
Go To Register Page
|
||||||
|
Element Should Be Visible ${SIGN IN LINK}
|
||||||
|
|
||||||
|
### / REGISTER PAGE LINKS ###
|
72
tests/EndToEnd/Tests/Navigation/available_pages.robot
Normal file
72
tests/EndToEnd/Tests/Navigation/available_pages.robot
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to browsing pages.
|
||||||
|
Suite Setup Run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Play Admin Sign In Workflow
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/404_page.robot
|
||||||
|
Resource ../../Pages/about_page.robot
|
||||||
|
Resource ../../Pages/account_create_page.robot
|
||||||
|
Resource ../../Pages/account_edit_page.robot
|
||||||
|
Resource ../../Pages/account_import_page.robot
|
||||||
|
Resource ../../Pages/account_show_qrcode_page.robot
|
||||||
|
Resource ../../Pages/accounts_page.robot
|
||||||
|
Resource ../../Pages/autolock_page.robot
|
||||||
|
Resource ../../Pages/capture_page.robot
|
||||||
|
Resource ../../Pages/error_page.robot
|
||||||
|
Resource ../../Pages/group_create_page.robot
|
||||||
|
Resource ../../Pages/group_edit_page.robot
|
||||||
|
Resource ../../Pages/groups_page.robot
|
||||||
|
Resource ../../Pages/login_page.robot
|
||||||
|
Resource ../../Pages/password_request_page.robot
|
||||||
|
Resource ../../Pages/password_reset_page.robot
|
||||||
|
Resource ../../Pages/register_page.robot
|
||||||
|
Resource ../../Pages/settings_account_page.robot
|
||||||
|
Resource ../../Pages/settings_oauth_page.robot
|
||||||
|
Resource ../../Pages/settings_oauth_pat_create_page.robot
|
||||||
|
Resource ../../Pages/settings_options_page.robot
|
||||||
|
Resource ../../Pages/settings_webauthn_page.robot
|
||||||
|
Resource ../../Pages/settings_webauthn_edit_page.robot
|
||||||
|
Resource ../../Pages/start_page.robot
|
||||||
|
Resource ../../Pages/webauthn_lost_page.robot
|
||||||
|
Resource ../../Pages/webauthn_recover_page.robot
|
||||||
|
Resource ../../common.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Page exists
|
||||||
|
[Template] Page Should Be Reachable
|
||||||
|
${ABOUT PAGE URL}
|
||||||
|
${CREATE ACCOUNT PAGE URL}
|
||||||
|
${EDIT ACCOUNT PAGE URL}
|
||||||
|
${IMPORT ACCOUNTS PAGE URL}
|
||||||
|
${SHOW ACCOUNT QRCODE PAGE URL}
|
||||||
|
${ACCOUNTS PAGE URL}
|
||||||
|
${CAPTURE PAGE URL}
|
||||||
|
${CREATE GROUP PAGE URL}
|
||||||
|
${EDIT GROUP PAGE URL}
|
||||||
|
${GROUPS PAGE URL}
|
||||||
|
${LOGIN PAGE URL}
|
||||||
|
${PASSWORD REQUEST PAGE URL}
|
||||||
|
${PASSWORD RESET PAGE URL}
|
||||||
|
${REGISTER PAGE URL}
|
||||||
|
${ACCOUNT SETTINGS PAGE URL}
|
||||||
|
${OAUTH SETTINGS PAGE URL}
|
||||||
|
${CREATE OAUTH PAT SETTINGS PAGE URL}
|
||||||
|
${OPTIONS SETTINGS PAGE URL}
|
||||||
|
${WEBAUTHN SETTINGS PAGE URL}
|
||||||
|
${RENAME WEBAUTHN DEVICE SETTINGS PAGE URL}
|
||||||
|
${START PAGE URL}
|
||||||
|
${WEBAUTHN LOST PAGE URL}
|
||||||
|
${WEBAUTHN RECOVER PAGE URL}
|
||||||
|
# autolock page must be test lastly because it logs the user out automatically
|
||||||
|
${AUTOLOCK PAGE URL}
|
||||||
|
|
||||||
|
Unknown Page
|
||||||
|
Go To ${ROOT URL}/_UNKNOWN_PAGE_
|
||||||
|
Wait Until Location Is ${404 PAGE URL}
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Page Should Be Reachable
|
||||||
|
[Arguments] ${url}
|
||||||
|
Go To ${url}
|
||||||
|
Wait Until Location Is ${url}
|
50
tests/EndToEnd/Tests/Navigation/protected_pages.robot
Normal file
50
tests/EndToEnd/Tests/Navigation/protected_pages.robot
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation A test suite containing tests related to browsing redirections.
|
||||||
|
Suite Setup Run Keywords
|
||||||
|
... Open Custom Browser
|
||||||
|
... AND Delete All Cookies
|
||||||
|
... AND Play Logout Workflow
|
||||||
|
Suite Teardown Close All Browsers
|
||||||
|
Resource ../../Pages/account_create_page.robot
|
||||||
|
Resource ../../Pages/account_edit_page.robot
|
||||||
|
Resource ../../Pages/account_import_page.robot
|
||||||
|
Resource ../../Pages/account_show_qrcode_page.robot
|
||||||
|
Resource ../../Pages/accounts_page.robot
|
||||||
|
Resource ../../Pages/capture_page.robot
|
||||||
|
Resource ../../Pages/group_create_page.robot
|
||||||
|
Resource ../../Pages/group_edit_page.robot
|
||||||
|
Resource ../../Pages/groups_page.robot
|
||||||
|
Resource ../../Pages/settings_account_page.robot
|
||||||
|
Resource ../../Pages/settings_oauth_page.robot
|
||||||
|
Resource ../../Pages/settings_oauth_pat_create_page.robot
|
||||||
|
Resource ../../Pages/settings_options_page.robot
|
||||||
|
Resource ../../Pages/settings_webauthn_page.robot
|
||||||
|
Resource ../../Pages/settings_webauthn_edit_page.robot
|
||||||
|
Resource ../../Pages/start_page.robot
|
||||||
|
Resource ../../common.resource
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Protected Page
|
||||||
|
[Template] Anonymous Should Be Redirected To Login Page
|
||||||
|
${CREATE ACCOUNT PAGE URL}
|
||||||
|
${EDIT ACCOUNT PAGE URL}
|
||||||
|
${IMPORT ACCOUNTS PAGE URL}
|
||||||
|
${SHOW ACCOUNT QRCODE PAGE URL}
|
||||||
|
${ACCOUNTS PAGE URL}
|
||||||
|
${CAPTURE PAGE URL}
|
||||||
|
${CREATE GROUP PAGE URL}
|
||||||
|
${EDIT GROUP PAGE URL}
|
||||||
|
${GROUPS PAGE URL}
|
||||||
|
${ACCOUNT SETTINGS PAGE URL}
|
||||||
|
${OAUTH SETTINGS PAGE URL}
|
||||||
|
${CREATE OAUTH PAT SETTINGS PAGE URL}
|
||||||
|
${OPTIONS SETTINGS PAGE URL}
|
||||||
|
${WEBAUTHN SETTINGS PAGE URL}
|
||||||
|
${RENAME WEBAUTHN DEVICE SETTINGS PAGE URL}
|
||||||
|
${START PAGE URL}
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Anonymous Should Be Redirected To Login Page
|
||||||
|
[Arguments] ${url}
|
||||||
|
Go To ${url}
|
||||||
|
Wait Until Location Is ${LOGIN PAGE URL}
|
@ -1,33 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Documentation A test suite containing tests related to browsing redirections.
|
|
||||||
Suite Setup Open Blank Browser
|
|
||||||
Suite Teardown Close All Browsers
|
|
||||||
Resource ../../Pages/register_page.robot
|
|
||||||
Resource ../../Pages/accounts_page.robot
|
|
||||||
Resource ../../Pages/settings_account_page.robot
|
|
||||||
Resource ../../Pages/settings_oauth_page.robot
|
|
||||||
Resource ../../Pages/settings_options_page.robot
|
|
||||||
Resource ../../Pages/settings_webauthn_page.robot
|
|
||||||
Resource ../../Pages/start_page.robot
|
|
||||||
Resource ../../Pages/create_account_page.robot
|
|
||||||
Resource ../../Pages/edit_account_page.robot
|
|
||||||
Resource ../../common.resource
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Protected Page
|
|
||||||
[Template] Anonymous Should Be Redirected To Login Page
|
|
||||||
${ACCOUNTS PAGE URL}
|
|
||||||
${ACCOUNT SETTINGS PAGE URL}
|
|
||||||
${OAUTH SETTINGS PAGE URL}
|
|
||||||
${OPTIONS SETTINGS PAGE URL}
|
|
||||||
${WEBAUTHN SETTINGS PAGE URL}
|
|
||||||
${CREATE ACCOUNT PAGE URL}
|
|
||||||
${EDIT ACCOUNT PAGE URL}
|
|
||||||
${START PAGE URL}
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
Anonymous Should Be Redirected To Login Page
|
|
||||||
[Arguments] ${url}
|
|
||||||
Delete All Cookies
|
|
||||||
Go To ${url}
|
|
||||||
Location Should Be ${LOGIN PAGE URL}
|
|
1
tests/EndToEnd/Tests/error_page.robot
Normal file
1
tests/EndToEnd/Tests/error_page.robot
Normal file
@ -0,0 +1 @@
|
|||||||
|
# TODO
|
@ -1,6 +1,6 @@
|
|||||||
# *** Settings ***
|
# *** Settings ***
|
||||||
# Documentation A test suite to check available links on the login page.
|
# Documentation A test suite to check available links on the login page.
|
||||||
# Suite Setup Open Blank Browser
|
# Suite Setup Open Custom Browser
|
||||||
# Suite Teardown Close Browser
|
# Suite Teardown Close Browser
|
||||||
# Resource Pages/login_page.robot
|
# Resource Pages/login_page.robot
|
||||||
# Resource workflows.resource
|
# Resource workflows.resource
|
||||||
@ -10,4 +10,4 @@
|
|||||||
|
|
||||||
# *** Test Cases ***
|
# *** Test Cases ***
|
||||||
# My Test
|
# My Test
|
||||||
# Play Delete User Account Workflow
|
# Play Delete Current User Account Workflow
|
||||||
|
@ -4,26 +4,28 @@ Library SeleniumLibrary
|
|||||||
Resource workflows.resource
|
Resource workflows.resource
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${SERVER} 2fauth
|
${SERVER} localhost
|
||||||
${BROWSER} chrome
|
${BROWSER} chrome
|
||||||
${DELAY} 0.5
|
# ${DELAY} 1
|
||||||
|
|
||||||
${USERNAME} Tester
|
${USERNAME} Tester
|
||||||
${EMAIL} testing@2fauth.app
|
${ADMIN EMAIL} testingadmin@2fauth.app
|
||||||
${PASSWORD} password
|
${USER EMAIL} testingadmin@2fauth.app
|
||||||
|
${PASSWORD} password
|
||||||
|
|
||||||
${ROOT URL} https://${SERVER}
|
${ROOT URL} http://${SERVER}
|
||||||
${LOGOUT LINK} lnkSignOut
|
${LOGOUT LINK} lnkSignOut
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Open Blank Browser
|
Open Custom Browser
|
||||||
Set Selenium Speed ${DELAY}
|
[Arguments] ${url}=${ROOT URL}
|
||||||
|
# Set Selenium Speed ${DELAY}
|
||||||
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
|
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
|
||||||
Call Method ${options} add_argument --lang\=en,en-us
|
Call Method ${options} add_argument --lang\=en,en-us
|
||||||
Call Method ${options} add_argument --disable-dev-shm-usage # See https://stackoverflow.com/questions/50642308/org-openqa-selenium-webdriverexception-unknown-error-devtoolsactiveport-file-d
|
Call Method ${options} add_argument --disable-dev-shm-usage # See https://stackoverflow.com/questions/50642308/org-openqa-selenium-webdriverexception-unknown-error-devtoolsactiveport-file-d
|
||||||
${prefs}= Create Dictionary intl.accept_languages=en,en-us
|
${prefs}= Create Dictionary intl.accept_languages=en,en-us
|
||||||
Call Method ${options} add_experimental_option prefs ${prefs}
|
Call Method ${options} add_experimental_option prefs ${prefs}
|
||||||
Open Browser url=${ROOT URL} browser=${BROWSER} options=${options}
|
Open Browser url=${url} browser=${BROWSER} options=${options}
|
||||||
Maximize Browser Window
|
Maximize Browser Window
|
||||||
|
|
||||||
Go Authenticated To
|
Go Authenticated To
|
||||||
@ -31,17 +33,31 @@ Go Authenticated To
|
|||||||
Go To ${url}
|
Go To ${url}
|
||||||
${is_authenticated}= Run Keyword And Return Status Location Should Be ${url}
|
${is_authenticated}= Run Keyword And Return Status Location Should Be ${url}
|
||||||
IF ${is_authenticated} == False
|
IF ${is_authenticated} == False
|
||||||
Play sign In Workflow
|
Play Admin Sign In Workflow
|
||||||
Go To ${url}
|
Go To ${url}
|
||||||
END
|
END
|
||||||
|
Wait Until Location Is ${url}
|
||||||
|
|
||||||
|
A Success Notification Should Appear
|
||||||
|
Wait Until Element Is Visible css:#vueNotification .is-success
|
||||||
|
|
||||||
An Error Notification Should Appear
|
An Error Notification Should Appear
|
||||||
Wait Until Element Is Visible css:#vueNotification .is-danger
|
Wait Until Element Is Visible css:#vueNotification .is-danger
|
||||||
|
|
||||||
Field Should Show An Error
|
Field Should Show An Error
|
||||||
[Arguments] ${field error}
|
[Arguments] ${field error}
|
||||||
Element Should Be Visible ${field error}
|
Wait Until Element Is Visible ${field error}
|
||||||
Should Not Be Empty ${field error}
|
Should Not Be Empty ${field error}
|
||||||
|
|
||||||
Scroll To Bottom
|
Scroll To Bottom
|
||||||
Execute Javascript window.scrollTo(0,document.body.scrollHeight)
|
Execute Javascript window.scrollTo(0,document.body.scrollHeight)
|
||||||
|
|
||||||
|
Element Should Have Class
|
||||||
|
[Arguments] ${element} ${className}
|
||||||
|
${class}= Get Element Attribute ${element} class
|
||||||
|
Should Contain ${class} ${className}
|
||||||
|
|
||||||
|
Element Should Not Have Class
|
||||||
|
[Arguments] ${element} ${className}
|
||||||
|
${class}= Get Element Attribute ${element} class
|
||||||
|
Should Not Contain ${class} ${className}
|
@ -8,28 +8,36 @@ Resource Pages/login_page.robot
|
|||||||
Resource Pages/register_page.robot
|
Resource Pages/register_page.robot
|
||||||
Resource Pages/accounts_page.robot
|
Resource Pages/accounts_page.robot
|
||||||
Resource Pages/settings_account_page.robot
|
Resource Pages/settings_account_page.robot
|
||||||
|
Resource Pages/autolock_page.robot
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Play Delete User Account Workflow
|
Play Delete Current User Account Workflow
|
||||||
Go To Account Settings Page
|
Go To Account Settings Page
|
||||||
Delete User Account
|
Delete User Account
|
||||||
|
Wait Until Location Is ${REGISTER PAGE URL}
|
||||||
|
|
||||||
Play sign In Workflow
|
Play Admin Sign In Workflow
|
||||||
|
Play Logout Workflow
|
||||||
Delete All Cookies
|
Delete All Cookies
|
||||||
Go To Legacy Login Page
|
Go To Legacy Login Page
|
||||||
Submit Credentials To Legacy Form Login ${EMAIL} ${PASSWORD}
|
Submit Credentials To Legacy Form Login ${ADMIN EMAIL} ${PASSWORD}
|
||||||
|
Wait Until Location Is ${ACCOUNTS PAGE URL}
|
||||||
|
|
||||||
Play Register New User Workflow
|
Play User Sign In Workflow
|
||||||
Go To Register Page
|
Play Logout Workflow
|
||||||
Submit User Data To Registration Form ${USERNAME} ${EMAIL} ${PASSWORD} ${PASSWORD}
|
Delete All Cookies
|
||||||
|
Go To Legacy Login Page
|
||||||
|
Submit Credentials To Legacy Form Login ${USER EMAIL} ${PASSWORD}
|
||||||
|
Wait Until Location Is ${ACCOUNTS PAGE URL}
|
||||||
|
|
||||||
Play Logout Workflow
|
Play Logout Workflow
|
||||||
Go To ${ROOT URL}/accounts
|
Go To ${ACCOUNTS PAGE URL}
|
||||||
${is_authenticated}= Run Keyword And Return Status Page Should Contain Element ${LOGOUT LINK}
|
${is_authenticated}= Run Keyword And Return Status Page Should Contain Element ${LOGOUT LINK}
|
||||||
IF ${is_authenticated} == True
|
IF ${is_authenticated} == True
|
||||||
Click Element ${LOGOUT LINK}
|
Click Element ${LOGOUT LINK}
|
||||||
Handle Alert
|
Handle Alert
|
||||||
END
|
END
|
||||||
|
Wait Until Location Is ${LOGIN PAGE URL}
|
Loading…
Reference in New Issue
Block a user