eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library Collections |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library json |
| 6 | Library HttpLibrary.HTTP |
| 7 | Library Selenium2Library |
| 8 | Library XvfbRobot |
| 9 | |
| 10 | |
| 11 | *** Test Cases *** |
| 12 | Get Requests health check ok |
| 13 | CreateSession clamp http://localhost:8080 |
| 14 | ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck |
| 15 | Should Be Equal As Strings ${resp.status_code} 200 |
| 16 | |
| 17 | Open Browser |
| 18 | # Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. |
| 19 | Start Virtual Display 1920 1080 |
| 20 | Open Browser http://localhost:8080/designer/index.html browser=firefox |
| 21 | Set Window Size 1920 1080 |
| 22 | ${title}= Get Title |
| 23 | Should Be Equal CLDS ${title} |
| 24 | |
| 25 | Bad Login to Clamp UI and Verify not logged in |
| 26 | Input Text locator=username text=bad_login |
| 27 | Input Text locator=password text=This_is_bad_password |
| 28 | Press Key locator=password key=\\13 |
| 29 | Wait Until Element Is Visible locator=username timeout=5 |
| 30 | Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin* |
| 31 | |
| 32 | Good Login to Clamp UI and Verify logged in |
| 33 | Input Text locator=username text=admin |
| 34 | Input Text locator=password text=password |
| 35 | Press Key locator=password key=\\13 |
| 36 | Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 |
| 37 | Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin |
| 38 | |
| 39 | Create Template from Menu |
eh552t | edc947f | 2017-08-25 18:00:32 +0200 | [diff] [blame^] | 40 | Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 |
eh552t | 9c0b468 | 2017-08-21 11:10:11 +0200 | [diff] [blame] | 41 | Click Element xpath=//*[@id="navbar"]/ul/li[1]/a |
| 42 | Wait Until Element Is Visible locator=Create Template timeout=60 |
| 43 | Click Element locator=Create Template |
| 44 | Input Text locator=modelName text=template1 |
| 45 | Click Button locator=OK |
| 46 | |
| 47 | Close Browser |
| 48 | Close Browser |