kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This is RobotFrame work script |
| 3 | Library ExtendedSelenium2Library |
| 4 | Library OperatingSystem |
| 5 | Library XvfbRobot |
| 6 | |
| 7 | |
| 8 | *** Variables *** |
kishore | 7a1888f | 2017-10-19 08:11:06 -0500 | [diff] [blame] | 9 | ${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989 |
| 10 | ${PORTAL_ENV} /ONAPPORTAL |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 11 | ${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm |
| 12 | ${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome |
| 13 | ${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets |
| 14 | ${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome |
| 15 | ${GLOBAL_APPLICATION_ID} robot-functional |
| 16 | ${GLOBAL_PORTAL_ADMIN_USER} demo |
| 17 | ${GLOBAL_PORTAL_ADMIN_PWD} demo123456! |
| 18 | ${GLOBAL_SELENIUM_BROWSER} chrome |
| 19 | ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary |
| 20 | ${GLOBAL_SELENIUM_DELAY} 0 |
| 21 | ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5 |
| 22 | ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15 |
| 23 | ${GLOBAL_BUILD_NUMBER} 0 |
| 24 | ${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt |
| 25 | |
| 26 | |
| 27 | *** Test Cases *** |
| 28 | |
| 29 | Portal admin Login To Portal GUI |
| 30 | [Documentation] Logs into Portal GUI |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 31 | # Setup Browser |
| 32 | Start Virtual Display 1920 1080 |
| 33 | Open Browser ${PORTAL_LOGIN_URL} chrome |
| 34 | # Go To ${PORTAL_LOGIN_URL} |
| 35 | Maximize Browser Window |
| 36 | Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} |
| 37 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
| 38 | Log Logging in to ${PORTAL_URL}${PORTAL_ENV} |
| 39 | # Handle Proxy Warning |
| 40 | Title Should Be Login |
| 41 | Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER} |
| 42 | Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} |
| 43 | Click Link xpath=//a[@id='loginBtn'] |
| 44 | Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} |
| 45 | Log Logged in to ${PORTAL_URL}${PORTAL_ENV} |
| 46 | |
| 47 | |
| 48 | Portal Admin Navigation Application Link Tab |
| 49 | [Documentation] Logs into Portal GUI as Portal admin |
| 50 | |
| 51 | Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1] |
| 52 | Page Should Contain ONAP Portal |
| 53 | |
| 54 | |
| 55 | Validate SDK Sub Menu |
| 56 | [Documentation] Logs into SDK GUI as Portal admin |
| 57 | Page Should Contain Home |
| 58 | Page Should Contain Sample Pages |
| 59 | Page Should Contain Reports |
| 60 | Page Should Contain Profile |
| 61 | Page Should Contain Admin |
kishore | 7a1888f | 2017-10-19 08:11:06 -0500 | [diff] [blame] | 62 | |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 63 | Click Sample Pages and validate sub Menu |
| 64 | [Documentation] Click Sample Pages |
| 65 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 66 | Click Link xpath=//a[@id='parent-item-Sample-Pages'] |
| 67 | Element Text Should Be xpath=//a[@title='Collaboration'] Collaboration |
| 68 | Element Text Should Be xpath=//a[@title='Notebook'] Notebook |
| 69 | Click Link xpath=//a[contains(@title,'Collaboration')] |
| 70 | Page Should Contain User List |
| 71 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 72 | Click Link xpath=//a[@id='parent-item-Sample-Pages'] |
| 73 | Click Link xpath=//a[contains(@title,'Notebook')] |
| 74 | Element Text Should Be xpath=//h1[contains(.,'Notebook')] Notebook |
kishore | 7a1888f | 2017-10-19 08:11:06 -0500 | [diff] [blame] | 75 | #Click Link xpath=//a[@id='parent-item-Home'] |
kishore | 0fdcc61 | 2017-10-09 08:19:36 -0500 | [diff] [blame] | 76 | |
| 77 | Click Reports and validate sub Menu |
| 78 | [Documentation] Click Reports Tab |
| 79 | #Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 80 | Click Link xpath=//a[@id='parent-item-Reports'] |
| 81 | Element Text Should Be xpath=//a[@title='All Reports'] All Reports |
| 82 | Element Text Should Be xpath=//a[@title='Create Reports'] Create Reports |
| 83 | Click Link xpath=//a[contains(@title,'All Reports')] |
| 84 | Page Should Contain Report search |
| 85 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 86 | Click Link xpath=//a[@id='parent-item-Reports'] |
| 87 | Click Link xpath=//a[contains(@title,'Create Reports')] |
| 88 | Page Should Contain Report Wizard |
| 89 | |
| 90 | Click Profile and validate sub Menu |
| 91 | [Documentation] Click Profile Tab |
| 92 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 93 | Click Link xpath=//a[@id='parent-item-Profile'] |
| 94 | Element Text Should Be xpath=//a[@title='Search'] Search |
| 95 | Element Text Should Be xpath=//a[@title='Self'] Self |
| 96 | Click Link xpath=//a[contains(@title,'Search')] |
| 97 | Page Should Contain Profile Search |
| 98 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 99 | Click Link xpath=//a[@id='parent-item-Profile'] |
| 100 | Click Link xpath=//a[contains(@title,'Self')] |
| 101 | Page Should Contain Self Profile Detail |
| 102 | |
| 103 | |
| 104 | Click Admin and validate sub Menu |
| 105 | [Documentation] Click Admin Tab |
| 106 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 107 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 108 | Element Text Should Be xpath=//a[@title='Roles'] Roles |
| 109 | Element Text Should Be xpath=//a[@title='Role Functions'] Role Functions |
| 110 | Element Text Should Be xpath=//a[@title='Cache Admin'] Cache Admin |
| 111 | Element Text Should Be xpath=//a[@title='Menus'] Menus |
| 112 | Element Text Should Be xpath=//a[@title='Usage'] Usage |
| 113 | Click Link xpath=//a[contains(@title,'Roles')] |
| 114 | Page Should Contain Roles |
| 115 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 116 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 117 | Click Link xpath=//a[contains(@title,'Role Function')] |
| 118 | Page Should Contain Role Function |
| 119 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 120 | Click Link xpath=.//a[@id='parent-item-Admin'] |
| 121 | #Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 122 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 123 | Click Link xpath=//a[contains(@title,'Cache Admin')] |
| 124 | Page Should Contain Cache Regions |
| 125 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 126 | Click Link xpath=.//a[@id='parent-item-Admin'] |
| 127 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 128 | Click Link xpath=//a[contains(@title,'Menus')] |
| 129 | Page Should Contain Admin Menu Items |
| 130 | Select frame xpath=.//*[@id='tabframe-xDemo-App'] |
| 131 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 132 | Click Link xpath=//a[@id='parent-item-Admin'] |
| 133 | Click Link xpath=//a[contains(@title,'Usage')] |
| 134 | Page Should Contain Current Usage |
| 135 | |
| 136 | |
| 137 | Teardown |
| 138 | [Documentation] Close All Open browsers |
| 139 | Close All Browsers |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | *** Keywords *** |