*** Settings ***

Documentation   Test OpenBMC GUI "Hardware Status" sub-menu of "Health" menu.

Resource        ../../lib/resource.robot

Suite Setup     Launch Browser And Login GUI
Suite Teardown  Close Browser
Test Setup      Test Setup Execution


*** Variables ***

${xpath_hardware_status_heading}  //h1[text()="Hardware status"]

*** Test Cases ***

Verify Navigation To Hardware Status Page
    [Documentation]  Verify navigation to hardware status page.
    [Tags]  Verify_Navigation_To_Hardware_Status_Page

    Page Should Contain Element  ${xpath_hardware_status_heading}


*** Keywords ***

Test Setup Execution
    [Documentation]  Do test case setup tasks.

    Click Element  ${xpath_health_menu}
    Click Element  ${xpath_hardware_status_sub_menu}
    Wait Until Keyword Succeeds  30 sec  5 sec  Location Should Contain  hardware-status

*** Settings ***

Documentation   Test OpenBMC GUI "Hardware Status" sub-menu of "Health" menu.

Resource        ../../lib/resource.robot

Suite Setup     Launch Browser And Login GUI
Suite Teardown  Close Browser
Test Setup      Test Setup Execution


*** Variables ***

${xpath_hardware_status_heading}  //h1[text()="Hardware status"]

*** Test Cases ***

Verify Navigation To Hardware Status Page
    [Documentation]  Verify navigation to hardware status page.
    [Tags]  Verify_Navigation_To_Hardware_Status_Page

    Page Should Contain Element  ${xpath_hardware_status_heading}


Verify Components On Hardware Status Page
    [Documentation]  Verify whether required components are displayed hardware status page.
    [Tags]  Verify_Components_On_Hardware_Status_Page

    Page Should Contain  System
    Page Should Contain  BMC manager
    Page Should Contain  Chassis
    Page Should Contain  DIMM slot
    Page Should Contain  Fans
    Page Should Contain  Power supplies
    Page Should Contain  Processors

*** Keywords ***

Test Setup Execution
    [Documentation]  Do test case setup tasks.

    Click Element  ${xpath_health_menu}
    Click Element  ${xpath_hardware_status_sub_menu}
    Wait Until Keyword Succeeds  30 sec  5 sec  Location Should Contain  hardware-status

Verify Components On Hardware Status Page
Verify Components On Hardware Status Page

Signed-off-by: Anusha Dathatri <b0fbc8597dc53d9d732be929e6b09fd9c08ed974@in.ibm.com>
Change-Id: I7abf23f5e7628a3c118664c5a367f2d3488a3e6b

openbmc/openbmc-test-automation,openbmc/openbmc-test-automation