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