3 Library RequestsLibrary
4 Library OperatingSystem
6 Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py
12 ${SELENIUM_SPEED_FAST} .2 seconds
13 ${SELENIUM_SPEED_SLOW} .5 seconds
14 ${BASE_URL} https://localhost:8443
18 ${auth}= Create List ${login} ${passw}
19 Create Session clamp ${BASE_URL} auth=${auth} disable_warnings=1
20 Set Global Variable ${clamp_session} clamp
23 Get Requests health check ok
25 ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
26 Should Be Equal As Strings ${resp.status_code} 200
29 # Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line.
30 Start Virtual Display 1920 1080
31 Set Selenium Speed ${SELENIUM_SPEED_SLOW}
32 Open Browser ${BASE_URL}/designer/index.html browser=firefox
34 Reply to authentication popup
35 Run Keyword And Ignore Error Insert into prompt ${login} ${passw}
38 Good Login to Clamp UI and Verify logged in
39 Set Window Size 1920 1080
41 Should Be Equal CLDS ${title}
42 Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
43 Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
46 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60
47 # Click Element xpath=//*[@id="navbar"]/ul/li[1]/a
48 # Wait Until Element Is Visible locator=Open CL timeout=60
49 # Click Element locator=Open CL
50 # Select From List By Label id=modelName HolmesModel1
51 # Click Button locator=OK
52 # Element Should Contain xpath=//*[@id="modeler_name"] Closed Loop Modeler - HolmesModel1
53 # Element Should Contain xpath=//*[@id="status_clds"] DESIGN
55 #Validate-Test Holmes CL
56 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
57 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
58 # Wait Until Element Is Visible locator=Validation Test timeout=60
59 # Click Element locator=Validation Test
60 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
61 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test
62 # Element Should Contain xpath=//*[@id="status_clds"] DESIGN
65 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
66 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
67 # Wait Until Element Is Visible locator=Submit timeout=60
68 # Click Element locator=Submit
69 # Click Button locator=Yes
70 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
71 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit
72 # Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
75 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
76 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
77 # Wait Until Element Is Visible locator=Resubmit timeout=60
78 # Click Element locator=Resubmit
79 # Click Button locator=Yes
80 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
81 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit
82 # Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
85 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
86 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
87 # Wait Until Element Is Visible locator=Deploy timeout=60
88 # Click Element locator=Deploy
89 ## Wait Until Element Is Visible xpath=//*[@id="deployProperties"] timeout=60
90 ## Input Text xpath=//*[@id="deployProperties"] text={}
91 # Click Button locator=Deploy
92 # Click Button locator=Yes
93 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
94 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy
95 # Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
98 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
99 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
100 # Wait Until Element Is Visible locator=Update timeout=60
101 # Click Element locator=Update
102 # Click Button locator=Yes
103 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
104 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update
105 # Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
108 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
109 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
110 # Wait Until Element Is Visible locator=Stop timeout=60
111 # Click Element locator=Stop
112 # Click Button locator=Yes
113 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
114 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop
115 # Element Should Contain xpath=//*[@id="status_clds"] STOPPED
118 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
119 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
120 # Wait Until Element Is Visible locator=Restart timeout=60
121 # Click Element locator=Restart
122 # Click Button locator=Yes
123 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
124 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart
125 # Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
128 # Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
129 # Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
130 # Wait Until Element Is Visible locator=UnDeploy timeout=60
131 # Click Element locator=UnDeploy
132 # Click Button locator=Yes
133 # Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
134 # Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy
135 # Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED