<commit_before>*** Settings ***
Documentation  This test suite will validate the "OpenBMC" GUI ->
...            "Server control" main menu -> "Server power
...            operations" submenu module.

Resource         ../../lib/resource.robot
Test Setup       Test Setup Execution  ${OBMC_PowerOff_state}
Test Teardown    Test Teardown Execution

*** Variables ***
${xpath_select_server_control}           //*[@id="nav__top-level"]/li[3]/button/span
${xpath_select_server_power_operations}  //a[@href='#/server-control/power-operations']
${string_server_power_operations}        Server power operations
${string_current_status}                 Current status
${string_select_power_operation}         Select a power operation
${string_warm_reboot}                    Attempts to perform an orderly shutdown before restarting the server
${string_cold_reboot}                    Shuts down the server immediately, then restarts it
${string_orderly_shutdown}               Attempts to stop all software on the server before removing power
${string_immediate_shutdown}             Removes power from the server without waiting for software to stop
${string_power_on}                       Attempts to power on the server

*** Test Case ***
# OpenBMC @ Power Off state test cases.

Verify Title Text Should Be Server Power Operations At Power Off
    [Documentation]  Verify display of title text "Server Power Operations".
    [Tags]  Verify_Title_Text_Should_Be_Server_Power_Operations_At_Power_Off
    ...  OBMC_PowerOff_state<commit_msg>Verify warm and cold reboot button at power off<commit_after>*** Settings ***
Documentation  This test suite will validate the "OpenBMC" GUI ->
...            "Server control" main menu -> "Server power
...            operations" submenu module.

Resource         ../../lib/resource.robot
Test Setup       Test Setup Execution  ${OBMC_PowerOff_state}
Test Teardown    Test Teardown Execution

*** Variables ***
${xpath_select_server_control}           //*[@id="nav__top-level"]/li[3]/button/span
${xpath_select_server_power_operations}  //a[@href='#/server-control/power-operations']
${string_server_power_operations}        Server power operations
${string_current_status}                 Current status
${string_select_power_operation}         Select a power operation
${string_warm_reboot}                    Attempts to perform an orderly shutdown before restarting the server
${string_cold_reboot}                    Shuts down the server immediately, then restarts it
${string_orderly_shutdown}               Attempts to stop all software on the server before removing power
${string_immediate_shutdown}             Removes power from the server without waiting for software to stop
${string_power_on}                       Attempts to power on the server

*** Test Case ***
# OpenBMC @ Power Off state test cases.

Verify Warm Reboot Button At Power Off
    [Documentation]  Verify warm reboot button is not present at power Off.
    [Tags]  Verify_Warm_Reboot_Button_At_Power_Off

    Select Server Power Operations Sub Menu
    Element Should Not Be Visible  ${xpath_select_button_warm_reboot}

Verify Cold Reboot Button At Power Off
    [Documentation]  Verify cold reboot button is not present at power Off.
    [Tags]  Verify_Cold_Reboot_Button_At_Power_Off

    Select Server Power Operations Sub Menu
    Element Should Not Be Visible  ${xpath_select_button_cold_reboot}

Verify Title Text Should Be Server Power Operations At Power Off
    [Documentation]  Verify display of title text "Server Power Operations".
    [Tags]  Verify_Title_Text_Should_Be_Server_Power_Operations_At_Power_Off
    ...  OBMC_PowerOff_state
{'fraction_non_alphanumeric': 0.0703380588876772, 'fraction_numerical': 0.0005452562704471102, 'mean_word_length': 3.331759149940968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5563831', 'n_tokens_mistral': 973, 'n_tokens_neox': 954, 'n_words': 335}