aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/portal-sdk/testsuites/test1.robot
blob: f3e4017fba1084e7d8df584b56fd9a6f932f003b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
*** Settings ***
Documentation    This is RobotFrame work script
Library    ExtendedSelenium2Library
Library    OperatingSystem
Library       XvfbRobot


*** Variables ***
${PORTAL_URL}   http://portal.api.simpledemo.onap.org:8989
${PORTAL_ENV}            /ONAPPORTAL
${PORTAL_LOGIN_URL}                ${PORTAL_URL}${PORTAL_ENV}/login.htm
${PORTAL_HOME_PAGE}        ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
${PORTAL_MICRO_ENDPOINT}    ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
${PORTAL_HOME_URL}                ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
${GLOBAL_APPLICATION_ID}           robot-functional
${GLOBAL_PORTAL_ADMIN_USER}   demo
${GLOBAL_PORTAL_ADMIN_PWD}    demo123456!
${GLOBAL_SELENIUM_BROWSER}        chrome
${GLOBAL_SELENIUM_BROWSER_CAPABILITIES}        Create Dictionary
${GLOBAL_SELENIUM_DELAY}          0
${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}        5
${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}        15
${GLOBAL_BUILD_NUMBER}    0
${GLOBAL_VM_PRIVATE_KEY}   ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt


*** Test Cases ***

Portal admin Login To Portal GUI
    [Documentation]   Logs into Portal GUI
#    Setup Browser
  Start Virtual Display    1920    1080
  Open Browser    ${PORTAL_LOGIN_URL}    chrome
#    Go To    ${PORTAL_LOGIN_URL}
    Maximize Browser Window
    Set Selenium Speed    ${GLOBAL_SELENIUM_DELAY}
    Set Browser Implicit Wait    ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
    Log    Logging in to ${PORTAL_URL}${PORTAL_ENV}
   # Handle Proxy Warning
    Title Should Be    Login
    Input Text    xpath=//input[@ng-model='loginId']    ${GLOBAL_PORTAL_ADMIN_USER}
    Input Password    xpath=//input[@ng-model='password']    ${GLOBAL_PORTAL_ADMIN_PWD}
    Click Link    xpath=//a[@id='loginBtn']
    Wait Until Page Contains Element    xpath=//img[@alt='Onap Logo']    ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}    
    Log    Logged in to ${PORTAL_URL}${PORTAL_ENV}


Portal Admin Navigation Application Link Tab    
    [Documentation]   Logs into Portal GUI as Portal admin
    
    Click Element    xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
    Page Should Contain    ONAP Portal
   
    
Validate SDK Sub Menu    
      [Documentation]   Logs into SDK GUI as Portal admin
      Page Should Contain    Home
      Page Should Contain    Sample Pages
      Page Should Contain    Reports
      Page Should Contain    Profile
      Page Should Contain    Admin    
        
Click Sample Pages and validate sub Menu  
     [Documentation]   Click Sample Pages
    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
    Click Link      xpath=//a[@id='parent-item-Sample-Pages']
    Element Text Should Be      xpath=//a[@title='Collaboration']   Collaboration
    Element Text Should Be      xpath=//a[@title='Notebook']   Notebook 
    Click Link     xpath=//a[contains(@title,'Collaboration')]
    Page Should Contain    User List  
    Select frame    xpath=.//*[@id='tabframe-xDemo-App'] 
    Click Link      xpath=//a[@id='parent-item-Sample-Pages']
    Click Link     xpath=//a[contains(@title,'Notebook')]
    Element Text Should Be     xpath=//h1[contains(.,'Notebook')]    Notebook
    #Click Link    xpath=//a[@id='parent-item-Home']
    
Click Reports and validate sub Menu  
     [Documentation]   Click Reports Tab
    #Select frame    xpath=.//*[@id='tabframe-xDemo-App']
    Click Link      xpath=//a[@id='parent-item-Reports']
    Element Text Should Be      xpath=//a[@title='All Reports']   All Reports
    Element Text Should Be      xpath=//a[@title='Create Reports']   Create Reports 
    Click Link     xpath=//a[contains(@title,'All Reports')]
    Page Should Contain    Report search   
    Select frame    xpath=.//*[@id='tabframe-xDemo-App'] 
    Click Link      xpath=//a[@id='parent-item-Reports']
    Click Link     xpath=//a[contains(@title,'Create Reports')]
    Page Should Contain    Report Wizard  
    
Click Profile and validate sub Menu  
     [Documentation]   Click Profile Tab
    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
    Click Link      xpath=//a[@id='parent-item-Profile']
    Element Text Should Be      xpath=//a[@title='Search']   Search
    Element Text Should Be      xpath=//a[@title='Self']   Self 
    Click Link     xpath=//a[contains(@title,'Search')]
    Page Should Contain    Profile Search 
    Select frame    xpath=.//*[@id='tabframe-xDemo-App']  
    Click Link      xpath=//a[@id='parent-item-Profile'] 
    Click Link     xpath=//a[contains(@title,'Self')]
    Page Should Contain    Self Profile Detail  
          
          
Click Admin and validate sub Menu  
     [Documentation]   Click Admin Tab
    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
    Click Link      xpath=//a[@id='parent-item-Admin']
    Element Text Should Be      xpath=//a[@title='Roles']   Roles
    Element Text Should Be      xpath=//a[@title='Role Functions']   Role Functions 
    Element Text Should Be      xpath=//a[@title='Cache Admin']   Cache Admin 
    Element Text Should Be      xpath=//a[@title='Menus']   Menus 
    Element Text Should Be      xpath=//a[@title='Usage']   Usage 
    Click Link     xpath=//a[contains(@title,'Roles')]
    Page Should Contain    Roles   
    Select frame    xpath=.//*[@id='tabframe-xDemo-App'] 
    Click Link      xpath=//a[@id='parent-item-Admin']
    Click Link     xpath=//a[contains(@title,'Role Function')]
    Page Should Contain    Role Function  
    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
    Click Link    xpath=.//a[@id='parent-item-Admin'] 
     #Select frame    xpath=.//*[@id='tabframe-xDemo-App'] 
     Click Link      xpath=//a[@id='parent-item-Admin']  
     Click Link     xpath=//a[contains(@title,'Cache Admin')]
     Page Should Contain    Cache Regions
    Select frame    xpath=.//*[@id='tabframe-xDemo-App']
    Click Link    xpath=.//a[@id='parent-item-Admin'] 
     Click Link      xpath=//a[@id='parent-item-Admin']  
     Click Link     xpath=//a[contains(@title,'Menus')]
     Page Should Contain    Admin Menu Items  
     Select frame    xpath=.//*[@id='tabframe-xDemo-App'] 
     Click Link      xpath=//a[@id='parent-item-Admin']
     Click Link      xpath=//a[@id='parent-item-Admin']
     Click Link     xpath=//a[contains(@title,'Usage')]
     Page Should Contain    Current Usage          
    
       
Teardown  
    [Documentation]    Close All Open browsers     
    Close All Browsers    
    

    

    

*** Keywords ***