114c1d4618e53448edd59385697718568721b04a
[integration/csit.git] / tests / clamp / UIs / 01__Open_And_Edit_TCA.robot
1 *** Settings ***
2 Library     Collections
3 Library     RequestsLibrary
4 Library     OperatingSystem
5 Library     json
6 Library     ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py
7 Library     XvfbRobot
8 *** Variables ***
9 ${login}                     admin
10 ${passw}                     password
11 ${SELENIUM_SPEED_FAST}       1 seconds
12 ${SELENIUM_SPEED_SLOW}       2 seconds
13 ${BASE_URL}                  https://localhost:443
14 *** Keywords ***
15 Create the sessions
16     ${auth}=    Create List     ${login}    ${passw}
17     Create Session   clamp  ${BASE_URL}    auth=${auth}   disable_warnings=1
18     Set Global Variable     ${clamp_session}      clamp
19 *** Test Cases ***
20 Get Requests health check ok
21     Create the sessions
22     ${resp}=    Get Request    ${clamp_session}   /restservices/clds/v1/healthcheck
23     Should Be Equal As Strings  ${resp.status_code}     200
24
25 Open Browser
26 # Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line.
27     Start Virtual Display    1920    1080
28     Set Selenium Speed      ${SELENIUM_SPEED_SLOW}
29     Open Browser    ${BASE_URL}/index.html    browser=firefox
30
31 Reply to authentication popup
32     Run Keyword And Ignore Error    Insert into prompt    ${login} ${passw}
33     Confirm action
34
35 Close Browser
36     Close Browser