ACL tests |
Check login form... |
open | http://127.0.0.1:4000 | |
assertText | //form[@action='/login']/fieldset/legend | Login |
assertText | //form[@action='/login']/fieldset/div[1]/label | Username: |
assertText | //form[@action='/login']/fieldset/div[2]/label | Password: |
assertValue | //form[@action='/login']/fieldset/div[3]/input | Login |
Check wrong login... |
type | //input[@name='username'] | selenium_simpleuser |
type | //input[@name='password'] | notthegoodpassword |
clickAndWait | login | |
assertText | //ul[@class='unstyled'] | Wrong username or password. |
Check simple user... |
type | //input[@name='username'] | selenium_simpleuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
verifyXpathCount | //a[text()='Admin'] | 0 |
verifyXpathCount | //a[text()='Users'] | 0 |
verifyXpathCount | //a[text()='Accounts'] | 0 |
assertText | //a[@class='btn dropdown-toggle'] | selenium_simpleuser |
assertText | //body/div[1]/div[1]/div[1]/ul[@class='nav']/li/a | Servers |
assertAttribute | //body/div[1]/div[1]/div[1]/ul[@class='nav']/li/a@href | /server |
assertText | //div[@id='main']/div[1]/div[1]/div[1]/p | No server found. |
assertAttribute | //form[@class='navbar-search pull-left']/input@placeholder | Search |
Check simple user profile... |
clickAndWait | link=Profile | |
assertText | //li[text()='selenium_acc'] | selenium_acc |
assertText | //div[@id='main']//form/fieldset/div[1]/label[1] | Current password: |
assertText | //div[@id='main']//form/fieldset/div[1]/label[2] | New password: |
assertText | //div[@id='main']//form/fieldset/div[1]/label[3] | Repeat password: |
Check simple user password modification... |
type | //input[@name='current_password'] | password |
type | //input[@name='new_password'] | newpassword |
type | //input[@name='repeat_password'] | newpassword |
clickAndWait | change_password | |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_simpleuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //ul[@class='unstyled'] | Wrong username or password. |
type | //input[@name='username'] | selenium_simpleuser |
type | //input[@name='password'] | newpassword |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_simpleuser |
clickAndWait | link=Profile | |
type | //input[@name='current_password'] | newpassword |
type | //input[@name='new_password'] | password |
type | //input[@name='repeat_password'] | password |
clickAndWait | change_password | |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
Check super user... |
type | //input[@name='username'] | selenium_superuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_superuser |
assertText | //body/div[1]/div[1]/div[1]/ul[@class='nav']/li/a | Servers |
assertAttribute | //body/div[1]/div[1]/div[1]/ul[@class='nav']/li/a@href | /server |
assertAttribute | //form[@class='navbar-search pull-left']/input@placeholder | Search |
assertText | //a[text()='selenium_server_1'] | selenium_server_1 |
assertText | //a[text()='Admin'] | Admin |
assertAttribute | //a[text()='Users']@href | /user |
assertAttribute | //a[text()='Accounts']@href | /account |
Check super user profile... |
clickAndWait | link=Profile | |
assertText | //li[text()='opm_admins'] | opm_admins |
assertText | //div[@id='main']//form/fieldset/div[1]/label[1] | Current password: |
assertText | //div[@id='main']//form/fieldset/div[1]/label[2] | New password: |
assertText | //div[@id='main']//form/fieldset/div[1]/label[3] | Repeat password: |
Check super user password modification... |
type | //input[@name='current_password'] | password |
type | //input[@name='new_password'] | newpassword |
type | //input[@name='repeat_password'] | newpassword |
clickAndWait | change_password | |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_superuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //ul[@class='unstyled'] | Wrong username or password. |
type | //input[@name='username'] | selenium_superuser |
type | //input[@name='password'] | newpassword |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_superuser |
clickAndWait | link=Profile | |
type | //input[@name='current_password'] | newpassword |
type | //input[@name='new_password'] | password |
type | //input[@name='repeat_password'] | password |
clickAndWait | change_password | |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_superuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_superuser |
Check super user user management... |
clickAndWait | link=Users | |
assertText | //div[@id='main']//a[text()='selenium_simpleuser'] | selenium_simpleuser |
assertText | //div[@id='main']//a[text()='selenium_superuser'] | selenium_superuser |
assertText | //div[@id='main']//a[@href='/user/delete/selenium_simpleuser'] | X |
verifyXpathCount | //div[@id='main']//a[@href='/user/delete/selenium_superuser'] | 0 |
assertText | //div[@id='main']//form//label[@for='username'] | Username: |
verifyXpathCount | //div[@id='main']//form//input[@name='username'] | 1 |
assertText | //div[@id='main']//form//label[@for='accname'] | Account name: |
verifyXpathCount | //div[@id='main']//form//select[@name='accname'] | 1 |
assertText | //div[@id='main']//form//label[@for='password'] | Password: |
verifyXpathCount | //div[@id='main']//form//input[@name='password'] | 1 |
assertText | //div[@id='main']//form//select[@name='accname']/option[@value='selenium_acc'] | selenium_acc |
test user removal |
chooseCancelOnNextConfirmation | | |
click | //a[@href='/user/delete/selenium_simpleuser'] | |
assertConfirmationPresent | | true |
assertConfirmation | Do you really want to delete the user "selenium_simpleuser" ? | Do you really want to delete the user "selenium_simpleuser" ? |
refreshAndWait | | |
assertText | //div[@id='main']//a[text()='selenium_simpleuser'] | selenium_simpleuser |
click | //a[@href='/user/delete/selenium_simpleuser'] | |
assertConfirmationPresent | | true |
assertConfirmation | Do you really want to delete the user "selenium_simpleuser" ? | Do you really want to delete the user "selenium_simpleuser" ? |
refreshAndWait | | |
verifyXpathCount | //div[@id='main']//a[text()='selenium_simpleuser'] | 0 |
type | //input[@name='username'] | selenium_simpleuser |
select | //select[@name='accname'] | selenium_acc |
type | //input[@name='password'] | password |
clickAndWait | create | |
assertText | //div[@id='main']//a[text()='selenium_simpleuser'] | selenium_simpleuser |
type | //input[@name='username'] | selenium_simpleuser |
select | //select[@name='accname'] | selenium_acc |
type | //input[@name='password'] | password |
clickAndWait | create | |
assertText | //ul[@class='unstyled'] | Could not add user |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_simpleuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_simpleuser |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_superuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_superuser |
clickAndWait | link=Users | |
test account addition |
clickAndWait | //div[@id='main']//a[@href='/user/selenium_superuser'] | |
assertText | //div[@id='main']//a[@href='/user/delacc/opm_admins/selenium_superuser'] | X |
assertText | //div[@id='main']//a[text()='opm_admins'] | opm_admins |
assertText | //div[@id='main']//form//label[@for='name'] | Account name: |
assertAttribute | //div[@id='main']//form//select[@id='accname']@name | accname |
assertText | //div[@id='main']//form//select[@id='accname']/option[@value='selenium_acc'] | selenium_acc |
assertAttribute | //div[@id='main']//form//input[@name='add']@value | Add |
select | //div[@id='main']//form//select[@name='accname'] | selenium_acc |
clickAndWait | add | |
assertText | //ul[@class='unstyled'] | Account added to user |
assertText | //div[@id='main']//a[@href='/user/delacc/selenium_acc/selenium_superuser'] | X |
assertText | //div[@id='main']//a[text()='selenium_acc'] | selenium_acc |
verifyXpathCount | //div[@id='main']//form//select[@id='accname']/option[@value='selenium_acc'] | 0 |
test account removal |
clickAndWait | //div[@id='main']//a[@href='/user/delacc/selenium_acc/selenium_superuser'] | |
assertText | //ul[@class='unstyled'] | Account removed from user |
assertText | //div[@id='main']//form//select[@id='accname']/option[@value='selenium_acc'] | selenium_acc |
Check super user account management... |
clickAndWait | link=Accounts | |
assertText | //div[@id='main']//a[text()='opm_admins'] | opm_admins |
assertText | //div[@id='main']//a[text()='selenium_acc'] | selenium_acc |
assertText | //div[@id='main']//a[@href='/account/delete/selenium_acc'] | X |
verifyXpathCount | //div[@id='main']//a[@href='/account/delete/opm_admins'] | 0 |
assertText | //div[@id='main']//form//label[@for='name'] | Account name: |
assertAttribute | //div[@id='main']//form//input[@id='accname']@name | accname |
assertAttribute | //div[@id='main']//form//input[@type='submit' and @name='create']@value | Create |
test account creation |
type | //input[@name='accname'] | selenium_acc2 |
clickAndWait | create | |
assertText | //div[@id='main']//a[text()='selenium_acc2'] | selenium_acc2 |
assertText | //div[@id='main']//a[@href='/account/delete/selenium_acc2'] | X |
clickAndWait | link=Users | |
clickAndWait | //a[@href='/user/selenium_simpleuser'] | |
assertText | //div[@id='main']//form//select[@id='accname']//option[@value='selenium_acc2'] | selenium_acc2 |
select | //select[@name='accname'] | selenium_acc2 |
clickAndWait | add | |
assertText | //ul[@class='unstyled'] | Account added to user |
assertText | //div[@id='main']//a[@href='/account/selenium_acc2'] | selenium_acc2 |
test account removal |
clickAndWait | link=Accounts | |
chooseCancelOnNextConfirmation | | |
click | //div[@id='main']//a[@href='/account/delete/selenium_acc2'] | |
assertConfirmationPresent | | true |
assertConfirmation | Do you really want to delete the account "selenium_acc2" ? | Do you really want to delete the account "selenium_acc2" ? |
refreshAndWait | | |
assertText | //div[@id='main']//a[@href='/account/delete/selenium_acc2'] | X |
click | //div[@id='main']//a[@href='/account/delete/selenium_acc2'] | |
assertConfirmationPresent | | true |
assertConfirmation | Do you really want to delete the account "selenium_acc2" ? | Do you really want to delete the account "selenium_acc2" ? |
refreshAndWait | | |
verifyXpathCount | //div[@id='main']//a[@href='/account/delete/selenium_acc2'] | 0 |
clickAndWait | link=Users | |
click | //a[@href='/user/selenium_simpleuser'] | |
verifyXpathCount | //div[@id='main']//a[text()='selenium_acc2'] | 0 |
test account detail |
clickAndWait | link=Accounts | |
clickAndWait | //div[@id='main']//a[@href='/account/selenium_acc'] | |
assertText | //div[@id='main']//div[@id='acc_userlist']//a[@href='/user/selenium_simpleuser'] | selenium_simpleuser |
assertText | //div[@id='main']//div[@id='acc_userlist']//a[@href='/account/delrol/selenium_acc/selenium_simpleuser'] | X |
verifyXpathCount | //div[@id='main']//div[@id='acc_serverlist']//li | 0 |
verifyXpathCount | //div[@id='main']//div[@id='acc_edit']/form | 3 |
assertText | //div[@id='main']//div[@id='acc_edit']//label[@for='username'] | Username: |
assertAttribute | //div[@id='main']//div[@id='acc_edit']//input[@id='new_username']@name | new_username |
assertText | //div[@id='main']//div[@id='acc_edit']//label[@for='password'] | Password: |
assertAttribute | //div[@id='main']//div[@id='acc_edit']//input[@id='password']@name | password |
assertAttribute | //div[@id='main']//div[@id='acc_edit']//input[@type='submit' and @name='create']@value | Create |
assertText | //div[@id='main']//div[@id='acc_edit']//label[@for='existing_user'] | Existing user : |
assertText | //div[@id='main']//div[@id='acc_edit']//select[@id='existing_username']/option[@value='selenium_superuser'] | selenium_superuser |
assertAttribute | //div[@id='main']//div[@id='acc_edit']//input[@type='submit' and @name='add']@value | Add |
assertText | //div[@id='main']//div[@id='acc_edit']//label[@for='hostname'] | Unassigned servers : |
assertText | //div[@id='main']//div[@id='acc_edit']//select[@id='existing_hostname']/option[text()='selenium_server_1'] | selenium_server_1 |
assertAttribute | //div[@id='main']//div[@id='acc_edit']//input[@type='submit' and @value='Assign']@name | add |
test account detail forms |
type | //input[@id='new_username'] | selenium_newuser |
type | //input[@id='password'] | password |
clickAndWait | //div[@id='main']//div[@id='acc_edit']//input[@type='submit' and @name='create'] | |
assertText | //ul[@class='unstyled'] | User added |
assertText | //div[@id='main']//div[@id='acc_userlist']//a[@href='/user/selenium_newuser'] | selenium_newuser |
clickAndWait | //div[@id='main']//a[@href='/account/delrol/selenium_acc/selenium_newuser'] | |
assertText | //ul[@class='unstyled'] | Account removed from user |
clickAndWait | link=Users | |
assertText | //div[@id='main']//a[text()='selenium_newuser'] | selenium_newuser |
clickAndWait | //div[@id='main']//a[text()='selenium_newuser'] | |
verifyXpathCount | //div[@id='main']//div[@id='user_memberof']//li | 0 |
goBackAndWait | | |
click | //a[@href='/user/delete/selenium_newuser'] | |
assertConfirmationPresent | | true |
assertConfirmation | Do you really want to delete the user "selenium_newuser" ? | Do you really want to delete the user "selenium_newuser" ? |
refreshAndWait | | |
clickAndWait | link=Accounts | |
clickAndWait | //div[@id='main']//a[@href='/account/selenium_acc'] | |
select | //select[@id='existing_username'] | selenium_superuser |
clickAndWait | //div[@id='main']//div[@id='acc_edit']//input[@type='submit' and @name='add'] | |
assertText | //ul[@class='unstyled'] | User added |
clickAndWait | //div[@id='main']//div[@id='acc_userlist']//a[@href='/account/delrol/selenium_acc/selenium_superuser'] | |
assertText | //ul[@class='unstyled'] | Account removed from user |
select | //select[@id='existing_hostname'] | selenium_server_1 |
clickAndWait | //div[@id='main']//div[@id='acc_edit']//input[@type='submit' and @value='Assign'] | |
assertText | //ul[@class='unstyled'] | Server granted |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_simpleuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //div[@id='main']//div[@id='server_list']//li[contains(text(),'selenium_acc')] | selenium_acc |
assertText | //div[@id='main']//div[@id='server_list']//a[text()='selenium_server_1'] | selenium_server_1 |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
type | //input[@name='username'] | selenium_superuser |
type | //input[@name='password'] | password |
clickAndWait | login | |
assertText | //a[@class='btn dropdown-toggle'] | selenium_superuser |
clickAndWait | link=Accounts | |
clickAndWait | //div[@id='main']//a[@href='/account/selenium_acc'] | |
clickAndWait | //div[@id='main']//div[@id='acc_serverlist']//a | |
assertText | //ul[@class='unstyled'] | Server revoked |
Logout... |
clickAndWait | link=Sign Out | |
assertText | //ul[@class='unstyled'] | You have logged out. |
End |