def test_lhn_stays_expanded(self, selenium): """Tests if, after opening LHN, it slides out and stays expanded.""" conftest_utils.navigate_to_page_with_lhn(selenium) lhn_menu = dashboard.Header(selenium).open_lhn_menu() initial_position = lhn_menu.my_objects.element.location selenium_utils.wait_until_stops_moving(lhn_menu.my_objects.element) selenium_utils.hover_over_element( selenium, dashboard.Header(selenium).button_my_tasks.element) assert initial_position == lhn.Menu(selenium).my_objects.element.location
def test_lhn_stays_expanded(self, selenium): """Tests if, after opening the LHN, it slides out and stays expanded.""" conftest_utils.navigate_to_page_with_lhn(selenium) lhn_menu = dashboard.Header(selenium).open_lhn_menu() initial_position = lhn_menu.my_objects.element.location selenium_utils.wait_until_stops_moving(lhn_menu.my_objects.element) selenium_utils.hover_over_element( selenium, dashboard.Header(selenium).button_my_tasks.element) assert initial_position == lhn.Menu(selenium).my_objects.element.location
def test_user_menu_checkbox(self, selenium): """Tests the user menu checkbox. With that also the user menu itself is tested since the model initializes all elements (and throws and exception if they're not present.""" conftest_utils.navigate_to_page_with_lhn(selenium) user_list = dashboard.Header(selenium).open_user_list() user_list.checkbox_daily_digest.click() user_list.checkbox_daily_digest.element.get_attribute("disabled") # restore previous state user_list.checkbox_daily_digest.click()
def test_redirect(self, selenium): """Tests if the user is redirected to the My Work page after clicking on the my work button in user dropdown""" conftest_utils.navigate_to_page_with_lhn(selenium) dashboard.Header(selenium)\ .open_user_list()\ .select_my_work() assert selenium.current_url == dashboard.Dashboard.URL
def test_user_menu_checkbox(self, selenium): """Tests the user menu checkbox. With that also the user menu itself is tested since the model initializes all elements (and throws and exception if they're not present.""" conftest_utils.navigate_to_page_with_lhn(selenium) user_list = dashboard.Header(selenium).open_user_list() user_list.checkbox_daily_digest.click() user_list.checkbox_daily_digest.element.get_attribute("disabled") # restore previous state user_list.checkbox_daily_digest.click()
def test_lhn_remembers_tab_state(self, selenium): """Tests if LHN remembers which tab is selected (my or all objects) after closing it.""" conftest_utils.navigate_to_page_with_lhn(selenium) header = dashboard.Header(selenium) # check if my objects tab saves state lhn_menu = header.open_lhn_menu() lhn_menu.select_my_objects() header.close_lhn_menu() header.open_user_list() new_lhn = header.open_lhn_menu() assert selenium_utils.is_value_in_attr(new_lhn.my_objects.element) is True # check if all objects tab saves state lhn_menu = header.open_lhn_menu() lhn_menu.select_all_objects() header.close_lhn_menu() header.open_user_list() new_lhn = header.open_lhn_menu() assert selenium_utils.is_value_in_attr(new_lhn.all_objects.element) is True
def test_lhn_remembers_tab_state(self, selenium): """Tests if LHN remembers which tab is selected (my or all objects) after closing it.""" conftest_utils.navigate_to_page_with_lhn(selenium) header = dashboard.Header(selenium) # check if my objects tab saves state lhn_menu = header.open_lhn_menu() lhn_menu.select_my_objects() header.close_lhn_menu() header.open_user_list() new_lhn = header.open_lhn_menu() assert selenium_utils.is_value_in_attr(new_lhn.my_objects.element) is True # check if all objects tab saves state lhn_menu = header.open_lhn_menu() lhn_menu.select_all_objects() header.close_lhn_menu() header.open_user_list() new_lhn = header.open_lhn_menu() assert selenium_utils.is_value_in_attr(new_lhn.all_objects.element) is True
def test_lhn_pin(self, selenium): """Tests if the pin is present and if it's default state is off.""" conftest_utils.navigate_to_page_with_lhn(selenium) lhn_menu = dashboard.Header(selenium).open_lhn_menu() assert lhn_menu.pin.is_activated is False
def test_lhn_pin(self, selenium): """Tests if the pin is present and if it's default state is off.""" conftest_utils.navigate_to_page_with_lhn(selenium) lhn_menu = dashboard.Header(selenium).open_lhn_menu() assert lhn_menu.pin.is_activated is False
def test_redirect(self, selenium): """Tests if the user is redirected to the My Work page after clicking on the my work button in user dropdown.""" conftest_utils.navigate_to_page_with_lhn(selenium) dashboard.Header(selenium).open_user_list().select_my_work() assert selenium.current_url == dashboard.Dashboard.URL