xref: /openbmc/openbmc-test-automation/gui/test/access_control/test_obmc_gui_ldap.robot (revision b2a2d948d555cb6e5169b9f21d489a3b089b4387)
1*** Settings ***
2
3Documentation  Test OpenBMC GUI "LDAP" sub-menu of "Access control".
4
5Resource        ../../lib/resource.robot
6
7Suite Setup     Launch Browser And Login OpenBMC GUI
8Suite Teardown  Close Browser
9Test Setup      Test Setup Execution
10
11Test Tags       OBMC_GUI_LDAP
12
13*** Variables ***
14
15${xpath_enable_ldap_checkbox}           //*[@id='ldap-auth-label']
16${xpath_secure_ldap_checkbox}           //*[@id='use-ssl']
17${xpath_openl_ldap_radio_button}        //input[@id='open-ldap']
18${xpath_active_directory_radio_button}  //input[@id='active-directory']
19${xpath_save_button}                    //button[contains(text(),'Save')]
20${xpath_reset_button}                   //button[contains(text(),'Reset')]
21${xpath_add_role_group_button}          //button[@type='button']//*[contains(text(),'Add role group')]
22${xpath_remove_role_groups_button}      //button[@type='button']//*[contains(text(),'Remove role groups')]
23
24*** Test Cases ***
25
26Verify Existence Of All Sections In LDAP Page
27    [Documentation]  Verify existence of all sections in LDAP page.
28    [Tags]  Verify_Existence_Of_All_Sections_In_LDAP_Page
29
30    Page Should Contain  Settings
31    Page Should Contain  Role groups
32
33
34Verify Existence Of All Buttons In LDAP Page
35    [Documentation]  Verify existence of all buttons in LDAP page.
36    [Tags]  Verify_Existence_Of_All_Buttons_In_LDAP_Page
37
38    # Buttons under settings section
39    Page Should Contain Element  ${xpath_openl_ldap_radio_button}
40    Page Should Contain Element  ${xpath_active_directory_radio_button}
41    Page Should Contain Element  ${xpath_save_button}
42    Page Should Contain Element  ${xpath_reset_button}
43
44    # Buttons under role groups section
45    Page Should Contain Element  ${xpath_add_role_group_button}
46    Page Should Contain Element  ${xpath_remove_role_groups_button}
47
48
49Verify Existence Of All Checkboxes In LDAP Page
50    [Documentation]  Verify existence of all checkboxes in LDAP page.
51    [Tags]  Verify_Existence_Of_All_Checkboxes_In_LDAP_Page
52
53    # Checkboxes under settings section
54    Page Should Contain Element  ${xpath_enable_ldap_checkbox}
55    Page Should Contain Element  ${xpath_secure_ldap_checkbox}
56
57
58*** Keywords ***
59
60Test Setup Execution
61    [Documentation]  Do test case setup tasks.
62
63    Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
64    Click Element  ${xpath_select_access_control}
65    Wait Until Page Does Not Contain Element  ${xpath_refresh_circle}
66    Click Element  ${xpath_select_ldap}
67    Wait Until Page Contains  Configure LDAP settings and manage role groups
68