1*** Settings ***
2
3Documentation  Test OpenBMC GUI "Sensors" sub-menu of "Server health".
4
5Resource        ../../lib/resource.robot
6
7Suite Setup     Launch Browser And Login OpenBMC GUI
8Suite Teardown  Close Browser
9Test Setup      Test Setup Execution
10
11*** Variables ***
12${xpath_select_server_health}   //*[@id="nav__top-level"]/li[2]/button
13${xpath_select_sensors}         //a[@href='#/server-health/sensors-overview']
14${xpath_sensors_export}         //a[contains(text(), "Export")]
15${xpath_sensors_search}         //*[@id="content__search-input"]
16${xpath_sensors_search_button}  //*[@id="content__search-submit"]
17
18*** Test Cases ***
19Verify Select Sensors From Server Health
20    [Documentation]  Verify ability to select "Sensors" sub-menu option of
21    ...  "Server health".
22    [Tags]  Verify_Select_Sensors_From_Server_Health
23
24    Wait Until Page Contains  Sensors
25    Page should contain  All sensors present in the system
26
27
28Verify Sensors Export From Server Health Clickable
29    [Documentation]  Verify ability to export sensors from "Sensors"
30    ...  sub-menu of "Server health".
31    [Tags]  Verify_Sensors_Export_From_Server_Health_Clickable
32
33    Page Should Contain Element  ${xpath_sensors_export}
34    Click Element  ${xpath_sensors_export}
35
36
37Verify Search Text Enterable
38    [Documentation]  Verify search text input allowed from "Sensors"
39    ...  sub-menu of "Server health".
40    [Tags]  Verify_Search_Text_Enterable
41
42    Page Should Contain Element  ${xpath_sensors_search}
43    Input Text  ${xpath_sensors_search}  Temperature
44    Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
45    Page Should Contain Element  ${xpath_sensors_search_button}
46    Focus  ${xpath_sensors_search_button}
47    Click Element  ${xpath_sensors_search_button}
48
49*** Keywords ***
50
51Test Setup Execution
52   [Documentation]  Do test case setup tasks.
53
54    Click Element  ${xpath_select_server_health}
55    Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
56    Click Element  ${xpath_select_sensors}
57
58