Ejemplo n.º 1
0
def click_agree(driver):
    """Click Agree."""
    assert wait_on_element(driver, 0.5, 30,
                           '//button[@ix-auto="button__I AGREE"]')
    driver.find_element_by_xpath(
        '//button[@ix-auto="button__I AGREE"]').click()
Ejemplo n.º 2
0
def you_should_see_the_dashboard(driver):
    """You should see the dashboard."""
    assert wait_on_element(driver, 1, 10, '//h1[contains(.,"Dashboard")]')
    assert wait_on_element(driver, 1, 10,
                           '//span[contains(.,"System Information")]')
Ejemplo n.º 3
0
def the_users_page_should_open(driver):
    """The Users page should open."""
    assert wait_on_element(driver, 1, 7, '//div[contains(.,"Users")]')
Ejemplo n.º 4
0
def click_on_add_acl_item(driver):
    """Click on Add ACL Item."""
    assert wait_on_element(driver, 1, 5, '//button[@ix-auto="button__ADD ACL ITEM"]')
    driver.find_element_by_xpath('//button[@ix-auto="button__ADD ACL ITEM"]').click()
Ejemplo n.º 5
0
def click_on_who_select_user(driver):
    """Click on who select User."""
    driver.find_element_by_xpath('//mat-select[@ix-auto="select__Who"]/div/div/span[contains(.,"Who")]').click()
    assert wait_on_element(driver, 0.5, 5, '//mat-option[@ix-auto="option__Who_User"]')
    driver.find_element_by_xpath('//mat-option[@ix-auto="option__Who_User"]').click()
Ejemplo n.º 6
0
def you_should_see_the_dashboard_and_system_information(driver):
    """You should see the dashboard and "System Information"."""
    assert wait_on_element(driver, 0.5, 5, '//span[contains(.,"System Information")]')
Ejemplo n.º 7
0
def on_the_dozer_pool_click_on_my_acl_dataset_3_dots_button_select_edit_permissions(driver):
    """On the dozer pool click on "my_acl_dataset" 3 dots button, select Edit Permissions."""
    assert wait_on_element(driver, 1, 5, '//mat-icon[@id="actions_menu_button__my_acl_dataset"]')
    driver.find_element_by_xpath('//mat-icon[@id="actions_menu_button__my_acl_dataset"]').click()
    assert wait_on_element(driver, 1, 5, '//button[@ix-auto="action__my_acl_dataset_Edit Permissions"]')
    driver.find_element_by_xpath('//button[@ix-auto="action__my_acl_dataset_Edit Permissions"]').click()
Ejemplo n.º 8
0
def navigate_to_system_and_click_support(driver):
    """Navigate to System and click Support."""
    driver.find_element_by_xpath('//a[@name="System-menu"]').click()
    assert wait_on_element(driver, 0.5, 30, '//a[contains(.,"Support")]')
    driver.find_element_by_xpath('//a[contains(.,"Support")]').click()
Ejemplo n.º 9
0
def the_support_page_license_information_should_load(driver):
    """The Support page License Information should load."""
    assert wait_on_element(driver, 0.5, 30,
                           '//p[contains(.,"License Information")]')
    driver.find_element_by_xpath('//p[contains(.,"License Information")]')
Ejemplo n.º 10
0
def interface_settings_should_appear(driver):
    """Interface Settings should appear."""
    assert wait_on_element(driver, 0.5, 30,
                           '//h4[contains(.,"Interface Settings")]')
    driver.find_element_by_xpath('//h4[contains(.,"Interface Settings")]')
Ejemplo n.º 11
0
def you_should_see_the_dashboard_and_serial_number_should_show_serial1(
        driver, serial1):
    """You should see the dashboard and serial number should show "serial1"."""
    assert wait_on_element(driver, 1, 5, f'//span[contains(.,"{serial1}")]')
    driver.find_element_by_xpath(f'//span[contains(.,"{serial1}")]')
Ejemplo n.º 12
0
def after_settings_are_applied_you_should_see_settings_applied(driver):
    """After settings are applied you should see "Settings applied"."""
    assert wait_on_element(driver, 0.5, 30,
                           '//h1[contains(.,"Settings saved")]')
    driver.find_element_by_xpath('//button[@ix-auto="button__CLOSE"]').click()
Ejemplo n.º 13
0
def click_save_when_finished(driver):
    """click save when finished."""
    assert wait_on_element(driver, 0.5, 30,
                           '//button[@ix-auto="button__SAVE"]')
    driver.find_element_by_xpath('//button[@ix-auto="button__SAVE"]').click()
Ejemplo n.º 14
0
def we_should_be_returned_to_license_information(driver):
    """We should be returned to license information."""
    assert wait_on_element(driver, 0.5, 30,
                           '//p[contains(.,"License Information")]')
    driver.find_element_by_xpath('//p[contains(.,"License Information")]')
Ejemplo n.º 15
0
def verify_the_new_acl_item_for_user_name_still_exist(driver, user):
    """Verify the new ACL item for user "{user}" still exist."""
    assert wait_on_element(driver, 1, 5, '//h4[contains(.,"File Information")]')
    assert wait_on_element(driver, 1, 5, '(//input[@placeholder="User"])[2]')
    assert attribute_value_exist(driver, '(//input[@placeholder="User"])[2]', 'value', user)
Ejemplo n.º 16
0
def the_update_license_widget_should_open(driver):
    """The "Update License" widget should open."""
    assert wait_on_element(driver, 0.5, 30,
                           '//h1[contains(.,"Update License")]')
    driver.find_element_by_xpath('//h1[contains(.,"Update License")]')
Ejemplo n.º 17
0
def navigate_to_dashboard(driver):
    """Navigate to Dashboard."""

    driver.find_element_by_xpath('//mat-list-item[@ix-auto="option__Dashboard"]').click()
    assert wait_on_element(driver, 0.5, 10, '//span[contains(.,"System Information")]')
Ejemplo n.º 18
0
def change_should_be_saved(driver):
    """Change should be saved."""
    assert wait_on_element_disappear(driver, 1, 20, '//h6[contains(.,"Please wait")]')
    assert wait_on_element(driver, 1, 7, '//div[contains(.,"Users")]')
Ejemplo n.º 19
0
def the_pools_page_should_open(driver):
    """The Pools page should open."""
    assert wait_on_element(driver, 0.5, 5, '//div[contains(.,"Pools")]')
Ejemplo n.º 20
0
def reopen_the_user_edit_page_and_ensure_that_the_additional_group_was_saved(driver):
    """reopen the user edit page and ensure that the additional group was saved."""
    driver.find_element_by_xpath('//tr[@ix-auto="expander__ericbsd"]/td').click()
    driver.find_element_by_xpath('//button[@ix-auto="button__EDIT_ericbsd"]').click()
    assert wait_on_element(driver, 1, 7, '//h3[contains(.,"Edit User")]')
    assert wait_on_element(driver, 0.5, 7, '//h4[contains(.,"Identification")]')
Ejemplo n.º 21
0
def the_edit_acl_page_should_open(driver):
    """The Edit ACL page should open."""
    if wait_on_element(driver, 1, 2, '//button[@ix-auto="button__USE ACL MANAGER"]'):
        driver.find_element_by_xpath('//button[@ix-auto="button__USE ACL MANAGER"]').click()
    assert wait_on_element(driver, 1, 5, '//h4[contains(.,"File Information")]')
Ejemplo n.º 22
0
def on_the_right_side_of_the_table_click_the_expand_arrow_for_one_of_the_users(driver):
    """On the right side of the table, click the expand arrow for one of the users."""
    assert wait_on_element(driver, 0.5, 7, '//tr[@ix-auto="expander__ericbsd"]/td')
    driver.find_element_by_xpath('//tr[@ix-auto="expander__ericbsd"]/td').click()
Ejemplo n.º 23
0
def the_new_acl_item_should_be_added(driver):
    """The new ACL item should be added."""
    assert wait_on_element(driver, 1, 5, '//mat-select[@ix-auto="select__Who"]/div/div/span[contains(.,"Who")]')
Ejemplo n.º 24
0
def the_user_input_should_appear(driver):
    """The User input should appear."""
    assert wait_on_element(driver, 1, 5, '(//input[@placeholder="User"])[2]')
Ejemplo n.º 25
0
def the_user_edit_page_should_open(driver):
    """The User Edit Page should open."""
    assert wait_on_element(driver, 1, 7, '//h3[contains(.,"Edit User")]')
Ejemplo n.º 26
0
def in_user_input_enter_eric_and_select_ericbsd(driver, input, user):
    """In User Input enter "{input}" and select "{user}"."""
    driver.find_element_by_xpath('(//input[@placeholder="User"])[2]').send_keys(input)
    assert wait_on_element(driver, 0.5, 5, f'//mat-option[@ix-auto="option__{user}"]')
    driver.find_element_by_xpath(f'//mat-option[@ix-auto="option__{user}"]').click()
Ejemplo n.º 27
0
def the_credentials_menu_should_expand_to_the_right(driver):
    """The Credentials menu should expand to the right."""
    assert wait_on_element(driver, 1, 7,
                           '//mat-list-item[@ix-auto="option__Local Users"]')
Ejemplo n.º 28
0
def click_the_save_button_should_be_return_to_pool_page(driver):
    """Click the Save button, should be return to pool page."""
    wait_on_element(driver, 0.5, 5, '//button[@ix-auto="button__SAVE"]')
    driver.find_element_by_xpath('//button[@ix-auto="button__SAVE"]').click()
    assert wait_on_element(driver, 1, 5, '//mat-panel-title[contains(.,"dozer")]')
    driver.find_element_by_xpath('//td[@ix-auto="value__dozer_name"]')
Ejemplo n.º 29
0
def the_user_field_should_expand_down_to_list_further_details(driver):
    """The User Field should expand down to list further details."""
    assert wait_on_element(driver, 0.5, 7,
                           '//button[@ix-auto="button__EDIT_ericbsd"]')
Ejemplo n.º 30
0
def end_user_license_agreement_truenas_should_appear(driver, agreement):
    """"End User License Agreement - TrueNAS" should appear."""
    assert wait_on_element(driver, 0.5, 30, f'//h1[contains(.,"{agreement}")]')
    driver.find_element_by_xpath(f'//h1[contains(.,"{agreement}")]')