[SO] SO release image for CSIT testing
[integration/csit.git] / tests / portal-sdk / testsuites / test1.robot
1 *** Settings ***
2 Documentation    This is RobotFrame work script
3 Library    ExtendedSelenium2Library
4 Library    OperatingSystem
5 Library         XvfbRobot
6
7
8 *** Variables ***
9 ${PORTAL_URL}           http://portal.api.simpledemo.onap.org:8990
10 ${PORTAL_ENV}            /ONAPPORTALSDK
11 ${PORTAL_LOGIN_URL}                ${PORTAL_URL}${PORTAL_ENV}/login.htm
12 ${PORTAL_HOME_PAGE}        ${PORTAL_URL}${PORTAL_ENV}/welcome
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}              demo
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
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[@id='loginId']    ${GLOBAL_PORTAL_ADMIN_USER}
42 #    Input Password    xpath=//input[@id='password']    ${GLOBAL_PORTAL_ADMIN_PWD}
43 #    Click Element    //*[@id="loginBtn"]
44 #    Wait Until Page Contains Element    xpath=//img[@src='app/fusionapp/icons/logo_onap_transbg.png']    ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
45 #    Log    Logged in to ${PORTAL_URL}${PORTAL_ENV}
46
47 SDKPortalAdmin Navigation Application Link Tab
48     [Documentation]    Logs into Portal GUI as Portal admin
49     Comment    Click Element    xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
50     Comment    Go To    ${PORTAL_HOME_PAGE}
51     Comment    Dismiss Alert    accept=false
52     #Scroll Element Into View    xpath=//span[@id='tab-Home']
53     #Click Element    xpath=//span[@id='tab-Home']
54     #Click Element    xpath=(//span[@id='tab-xDemo-App']/following::i[@class='ion-close-round'])[1]
55     Comment    Click Element    xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
56
57 #Validate SDK Sub Menu
58 #    [Documentation]    Logs into SDK GUI as Portal admin
59 #    Page Should Contain    Home
60 #    Page Should Contain    Sample Pages
61 #    Page Should Contain    Reports
62 #    Page Should Contain    Profile
63 #    Page Should Contain    Admin
64
65 ##Click Sample Pages and validate sub Menu
66 #    #[Documentation]    Click Sample Pages
67 #    #Comment    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 #    #Comment    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
78 #Click Reports and validate sub Menu
79 #    [Documentation]    Click Reports Tab
80 #    #Select frame    xpath=.//*[@id='tabframe-xDemo-App']
81 #    Click Link    xpath=//a[@id='parent-item-Reports']
82 #    Element Text Should Be    xpath=//a[@title='All Reports']    All Reports
83 #    Element Text Should Be    xpath=//a[@title='Create Reports']    Create Reports
84 #    Click Link    xpath=//a[contains(@title,'All Reports')]
85 #    Page Should Contain    Report search
86 #    Comment    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
87 #    Click Link    xpath=//a[@id='parent-item-Reports']
88 #    Click Link    xpath=//a[contains(@title,'Create Reports')]
89 #    Page Should Contain    Report Wizard
90
91 #Click Profile and validate sub Menu
92 #    [Documentation]    Click Profile Tab
93 #    Comment    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
94 #    Click Link    xpath=//a[@id='parent-item-Profile']
95 #    Element Text Should Be    xpath=//a[@title='Search']    Search
96 #    Element Text Should Be    xpath=//a[@title='Self']    Self
97 #    Click Link    xpath=//a[contains(@title,'Search')]
98 #    Page Should Contain    Profile Search
99 #    Comment    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
100 #    Click Link    xpath=//a[@id='parent-item-Profile']
101 #    Click Link    xpath=//a[contains(@title,'Self')]
102 #    Page Should Contain    Self Profile Detail
103
104 #Click Admin and validate sub Menu
105 #    [Documentation]    Click Admin Tab
106 #    Comment    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 #    Comment    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 #    Comment    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 #    Comment    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 #    Comment    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 Teardown
137     [Documentation]    Close All Open browsers
138     Close All Browsers
139
140 *** Keywords ***