blob: fafb00042949b0c9fb1f0ea0786fc32d9091896d [file] [log] [blame]
eh552t9c0b4682017-08-21 11:10:11 +02001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6Library HttpLibrary.HTTP
7Library Selenium2Library
8Library XvfbRobot
9
10
11*** Test Cases ***
12Get 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
17Open 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
25Bad 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
32Good 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
39Create Template from Menu
eh552tedc947f2017-08-25 18:00:32 +020040 Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60
eh552t9c0b4682017-08-21 11:10:11 +020041 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
47Close Browser
48 Close Browser