<reponame>MTokarenko/Python
ADMINISTRATION_BTN = '//span[@cuba-id="administration"]'
USERS_BTN = '//span[@cuba-id="sec$User.browse"]'
NEW_USER_FIELD = '//div[contains(text(), "Логин")]/following::input'
GROUP_BTN = '//div[contains(text(), "Группа")]/following::div[@role = "button"][1]'
LIMITED_ACCESS_BTN = '//span[contains(text(), "Ограниченный доступ")]'
GROUP_CHOOSE_BTN = '//div[contains(text(), "Группы доступа")]/following::div[@role = "button"][1]'
LOGIN_FIELD = '//input[@cuba-id="loginField"]'
PSWD_FIELD = '//input[@cuba-id="passwordField"]'
TEZIS_BTN = '//div[@cuba-id="logoImage"]'
ENTER_BTN = '//div[@cuba-id="loginSubmitButton"]'
OK_BTN = '//div[@cuba-id="windowCommit"]'
REFERENCE_BTN = '//span[@cuba-id="reference"]'
USERS_SUBS_BTN = '//span[@cuba-id="df$UserSubstitution.browse"]'
CURRENT_USER_FIELD = "//*[@id='substitutedUserSelect']/input"
ASSIGNMENT_ID = 'descendant::div[@cuba-id="infoTable"]//div[contains(text(), "ID")]//following::div[1]'
SUCCESS_BTN = './/div[contains(@class, "wf-success v-button")]'
SUCCESS_BTN_FORM = './/span[contains(text(), "{}")]//ancestor::div[contains(@class, "wf-success v-button")]'
FAILURE_BTN = './/div[contains(@class, "wf-failure v-button")]'
FAILURE_BTN_FORM = './/span[contains(text(), "{}")]//ancestor::div[contains(@class, "wf-failure v-button")]'
SAVE_BTN = './/div[@cuba-id="SAVE_ACTION_BTN"]'

class Process_BTNS():
    WINDOW_COMMIT_BTN = '//div[@cuba-id="windowCommit"]'
    COMMENT_AREA = "//textarea[@cuba-id='commentText']"
    TO_ENDORSEMENT_BTN = '//div[@cuba-id="Improvement.ToEndorsement_BTN"]'
    REPEAT_CHECKBOX = '//span[@cuba-id="refusedOnly"]/input'
    CANCEL_PROCESS_BTN = '//div[@cuba-id="CANCEL_PROCESS_ACTION_BTN"]'
    CONFIRM_BTN = '//div[@cuba-id="{}.Ok_BTN"]'
    NOT_CONFIRM_BTN = '//div[@cuba-id="{}.NotOk_BTN"]'
    TO_REWORK_BTN = '//div[@cuba-id="{}.Rework_BTN"]'

ADMINISTRATION_BTN = '//span[@cuba-id="administration"]'
USERS_BTN = '//span[@cuba-id="sec$User.browse"]'
NEW_USER_FIELD = '//div[contains(text(), "Логин")]/following::input'
GROUP_BTN = '//div[contains(text(), "Группа")]/following::div[@role = "button"][1]'
LIMITED_ACCESS_BTN = '//span[contains(text(), "Ограниченный доступ")]'
GROUP_CHOOSE_BTN = '//div[contains(text(), "Группы доступа")]/following::div[@role = "button"][1]'
LOGIN_FIELD = '//input[@cuba-id="loginField"]'
PSWD_FIELD = '//input[@cuba-id="passwordField"]'
TEZIS_BTN = '//div[@cuba-id="logoImage"]'
ENTER_BTN = '//div[@cuba-id="loginSubmitButton"]'
OK_BTN = '//div[@cuba-id="windowCommit"]'
REFERENCE_BTN = '//span[@cuba-id="reference"]'
USERS_SUBS_BTN = '//span[@cuba-id="df$UserSubstitution.browse"]'
CURRENT_USER_FIELD = "//*[@id='substitutedUserSelect']/input"
ASSIGNMENT_ID = 'descendant::div[@cuba-id="infoTable"]//div[contains(text(), "ID")]//following::div[1]'
SUCCESS_BTN = './/div[contains(@class, "wf-success v-button")]'
SUCCESS_BTN_FORM = './/span[contains(text(), "{}")]//ancestor::div[contains(@class, "wf-success v-button")]'
FAILURE_BTN = './/div[contains(@class, "wf-failure v-button")]'
FAILURE_BTN_FORM = './/span[contains(text(), "{}")]//ancestor::div[contains(@class, "wf-failure v-button")]'
SAVE_BTN = './/div[@cuba-id="SAVE_ACTION_BTN"]'

class Process_BTNS():
    WINDOW_COMMIT_BTN = '//div[@cuba-id="windowCommit"]'
    COMMENT_AREA = "//textarea[@cuba-id='commentText']"
    TO_ENDORSEMENT_BTN = '//div[@cuba-id="Improvement.ToEndorsement_BTN"]'
    REPEAT_CHECKBOX = '//span[@cuba-id="refusedOnly"]/input'
    CANCEL_PROCESS_BTN = '//div[@cuba-id="CANCEL_PROCESS_ACTION_BTN"]'
    CONFIRM_BTN = '//div[@cuba-id="{}.Ok_BTN"]'
    NOT_CONFIRM_BTN = '//div[@cuba-id="{}.NotOk_BTN"]'
    TO_REWORK_BTN = '//div[@cuba-id="{}.Rework_BTN"]'