package cz.moneta.test.dsl.fortelight.components;

import cz.moneta.test.dsl.fortelight.pages.portal.PortalPage;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.fortelight.components.PortalRoleMenu.ROLE_SELECT;

@Wait(ROLE_SELECT)
public interface PortalRoleMenu extends Builder {
    String ROLE_TR_TABLE = "//tr[@id='pair-frmroleForm-role']";
    String ROLE_SELECT  = ROLE_TR_TABLE + "//select[@id='frmroleForm-role']";
    String ROLE_MENU = "//div[@class='side-block']//select[@name='role']";
    String ROLE_ADMIN = ROLE_MENU + "//option[text()='Superuživatel']";

    @GetElementContent(ROLE_ADMIN)
    String getAdminId();

    @Select(value = ROLE_SELECT)
    PortalPage SelectSuperAdmin(String valueToSelect);
}