blob: ad332c5df25f08d84a4ffaf0e99df6b5402c795b [file] [log] [blame]
kishore0fdcc612017-10-09 08:19:36 -05001*** Settings ***
2Documentation This is RobotFrame work script
3Library ExtendedSelenium2Library
4Library OperatingSystem
5Library XvfbRobot
6
7
8*** Variables ***
9${PORTAL_URL} http://portal.api.simpledemo.openecomp.org:8989
10${PORTAL_ENV} /ECOMPPORTAL
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
29Portal admin Login To Portal GUI
30 [Documentation] Logs into Portal GUI
31 ## Setup Browser Now being managed by test case
32# Setup Browser
33 Start Virtual Display 1920 1080
34 Open Browser ${PORTAL_LOGIN_URL} chrome
35# Go To ${PORTAL_LOGIN_URL}
36 Maximize Browser Window
37 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
38 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
39 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
40 # Handle Proxy Warning
41 Title Should Be Login
42 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
43 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
44 Click Link xpath=//a[@id='loginBtn']
45 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
46 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
47
48
49Portal Admin Navigation Application Link Tab
50 [Documentation] Logs into Portal GUI as Portal admin
51
52 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
53 Page Should Contain ONAP Portal
54
55
56Validate SDK Sub Menu
57 [Documentation] Logs into SDK GUI as Portal admin
58 Page Should Contain Home
59 Page Should Contain Sample Pages
60 Page Should Contain Reports
61 Page Should Contain Profile
62 Page Should Contain Admin
63 # Click Element xpath=(.//span[@id='tab-Home'])[1]
64
65Click Sample Pages and validate sub Menu
66 [Documentation] Click Sample Pages
67 Select frame xpath=.//*[@id='tabframe-xDemo-App']
68 Click Link xpath=//a[@id='parent-item-Sample-Pages']
69 Element Text Should Be xpath=//a[@title='Collaboration'] Collaboration
70 Element Text Should Be xpath=//a[@title='Notebook'] Notebook
71 Click Link xpath=//a[contains(@title,'Collaboration')]
72 Page Should Contain User List
73 Select frame xpath=.//*[@id='tabframe-xDemo-App']
74 Click Link xpath=//a[@id='parent-item-Sample-Pages']
75 Click Link xpath=//a[contains(@title,'Notebook')]
76 Element Text Should Be xpath=//h1[contains(.,'Notebook')] Notebook
77 Click Link xpath=//a[@id='parent-item-Home']
78
79Click Reports and validate sub Menu
80 [Documentation] Click Reports Tab
81 #Select frame xpath=.//*[@id='tabframe-xDemo-App']
82 Click Link xpath=//a[@id='parent-item-Reports']
83 Element Text Should Be xpath=//a[@title='All Reports'] All Reports
84 Element Text Should Be xpath=//a[@title='Create Reports'] Create Reports
85 Click Link xpath=//a[contains(@title,'All Reports')]
86 Page Should Contain Report search
87 Select frame xpath=.//*[@id='tabframe-xDemo-App']
88 Click Link xpath=//a[@id='parent-item-Reports']
89 Click Link xpath=//a[contains(@title,'Create Reports')]
90 Page Should Contain Report Wizard
91
92Click Profile and validate sub Menu
93 [Documentation] Click Profile Tab
94 Select frame xpath=.//*[@id='tabframe-xDemo-App']
95 Click Link xpath=//a[@id='parent-item-Profile']
96 Element Text Should Be xpath=//a[@title='Search'] Search
97 Element Text Should Be xpath=//a[@title='Self'] Self
98 Click Link xpath=//a[contains(@title,'Search')]
99 Page Should Contain Profile Search
100 Select frame xpath=.//*[@id='tabframe-xDemo-App']
101 Click Link xpath=//a[@id='parent-item-Profile']
102 Click Link xpath=//a[contains(@title,'Self')]
103 Page Should Contain Self Profile Detail
104
105
106Click Admin and validate sub Menu
107 [Documentation] Click Admin Tab
108 Select frame xpath=.//*[@id='tabframe-xDemo-App']
109 Click Link xpath=//a[@id='parent-item-Admin']
110 Element Text Should Be xpath=//a[@title='Roles'] Roles
111 Element Text Should Be xpath=//a[@title='Role Functions'] Role Functions
112 Element Text Should Be xpath=//a[@title='Cache Admin'] Cache Admin
113 Element Text Should Be xpath=//a[@title='Menus'] Menus
114 Element Text Should Be xpath=//a[@title='Usage'] Usage
115 Click Link xpath=//a[contains(@title,'Roles')]
116 Page Should Contain Roles
117 Select frame xpath=.//*[@id='tabframe-xDemo-App']
118 Click Link xpath=//a[@id='parent-item-Admin']
119 Click Link xpath=//a[contains(@title,'Role Function')]
120 Page Should Contain Role Function
121 Select frame xpath=.//*[@id='tabframe-xDemo-App']
122 Click Link xpath=.//a[@id='parent-item-Admin']
123 #Select frame xpath=.//*[@id='tabframe-xDemo-App']
124 Click Link xpath=//a[@id='parent-item-Admin']
125 Click Link xpath=//a[contains(@title,'Cache Admin')]
126 Page Should Contain Cache Regions
127 Select frame xpath=.//*[@id='tabframe-xDemo-App']
128 Click Link xpath=.//a[@id='parent-item-Admin']
129 Click Link xpath=//a[@id='parent-item-Admin']
130 Click Link xpath=//a[contains(@title,'Menus')]
131 Page Should Contain Admin Menu Items
132 Select frame xpath=.//*[@id='tabframe-xDemo-App']
133 Click Link xpath=//a[@id='parent-item-Admin']
134 Click Link xpath=//a[@id='parent-item-Admin']
135 Click Link xpath=//a[contains(@title,'Usage')]
136 Page Should Contain Current Usage
137
138
139Teardown
140 [Documentation] Close All Open browsers
141 Close All Browsers
142
143
144
145
146
147
148*** Keywords ***