Актуализация тестов после перехода на версию 1.33
parent
c38cf601cb
commit
abf1a89bc3
|
|
@ -37,7 +37,6 @@ class MaintenanceEventsContainer(EventsContainerComponent):
|
|||
self.add_tab_to_toolbar(toolbar_locator.locator(EventPanelLocators.CSV_TOOLBAR_BUTTON), "export_to_csv_button")
|
||||
|
||||
events_filter = self.get_events_filter()
|
||||
events_filter.add_filtering_parameter("filter_date", "Дата")
|
||||
events_filter.add_filtering_parameter("filter_event_name", "Наименование события")
|
||||
events_filter.add_filtering_parameter("filter_type", "Тип")
|
||||
events_filter.add_filtering_parameter("filter_status", "Состояние")
|
||||
|
|
@ -76,7 +75,6 @@ class MaintenanceEventsContainer(EventsContainerComponent):
|
|||
events_filter = self.click_filter_button()
|
||||
events_filter.check_content()
|
||||
|
||||
events_filter.should_be_filtering_parameter("Дата")
|
||||
events_filter.should_be_filtering_parameter("Наименование события")
|
||||
events_filter.should_be_filtering_parameter("Тип")
|
||||
events_filter.should_be_filtering_parameter("Состояние")
|
||||
|
|
|
|||
|
|
@ -55,8 +55,10 @@ class TestActionsEventsContainer:
|
|||
|
||||
# Проверка выделения строк
|
||||
actions_events_container.check_events_table_row_highlighting(0)
|
||||
actions_events_container.check_events_table_row_highlighting(rows_count - 1)
|
||||
actions_events_container.check_events_table_row_highlighting(int(rows_count / 2))
|
||||
if rows_count > 1:
|
||||
actions_events_container.check_events_table_row_highlighting(rows_count - 1)
|
||||
if rows_count > 3:
|
||||
actions_events_container.check_events_table_row_highlighting(int(rows_count / 2))
|
||||
|
||||
actions_events_container.click_archive_button()
|
||||
# Получение количества строк в таблице Архив
|
||||
|
|
@ -64,12 +66,14 @@ class TestActionsEventsContainer:
|
|||
|
||||
# Проверка выделения строк
|
||||
actions_events_container.check_events_table_row_highlighting(0)
|
||||
actions_events_container.check_events_table_row_highlighting(rows_count - 1)
|
||||
actions_events_container.check_events_table_row_highlighting(int(rows_count / 2))
|
||||
if rows_count > 1:
|
||||
actions_events_container.check_events_table_row_highlighting(rows_count - 1)
|
||||
if rows_count > 3:
|
||||
actions_events_container.check_events_table_row_highlighting(int(rows_count / 2))
|
||||
|
||||
# @pytest.mark.develop
|
||||
@pytest.mark.develop
|
||||
def test_events_table_scrolling(self, browser: Page):
|
||||
"""Проверяет возможность скроллинга таблицы событий.
|
||||
"""Проверяет возможность скроллинга таблицы событий на примере таблицы Архив.
|
||||
|
||||
Args:
|
||||
browser: Экземпляр страницы Playwright.
|
||||
|
|
@ -82,18 +86,19 @@ class TestActionsEventsContainer:
|
|||
mp.should_be_event_panel()
|
||||
|
||||
actions_events_container = mp.click_events_panel_actions_tab()
|
||||
actions_events_container.click_archive_button()
|
||||
|
||||
events_panel_position = mp.get_events_panel_position()
|
||||
|
||||
# Проверка, что панель с таблицей открыта
|
||||
assert events_panel_position != "bottom", "Panel with system log events should be opened"
|
||||
assert events_panel_position != "bottom", "Panel with actions events should be opened"
|
||||
|
||||
is_scrollable = actions_events_container.check_events_table_verticall_scrolling()
|
||||
|
||||
# Убеждаемся, что панель открыта наполовину и проверяем скроллинг
|
||||
assert events_panel_position == "center",\
|
||||
"Panel with system log events should be located on the main page center"
|
||||
assert is_scrollable, "System log events table should be scrollable"
|
||||
"Panel with actions events should be located on the main page center"
|
||||
assert is_scrollable, "Actions events table should be scrollable"
|
||||
|
||||
# Скроллинг вниз
|
||||
actions_events_container.scroll_events_table_down()
|
||||
|
|
@ -117,10 +122,10 @@ class TestActionsEventsContainer:
|
|||
|
||||
events_panel_position = mp.get_events_panel_position()
|
||||
assert events_panel_position == "top",\
|
||||
"Panel with system log events should be located on the main page top"
|
||||
"Panel with actions events should be located on the main page top"
|
||||
|
||||
is_scrollable = actions_events_container.check_events_table_verticall_scrolling()
|
||||
assert is_scrollable, "System log events table should be scrollable in the full window"
|
||||
assert is_scrollable, "Actions events table should be scrollable in the full window"
|
||||
|
||||
# Скроллинг вниз
|
||||
actions_events_container.scroll_events_table_down()
|
||||
|
|
@ -239,7 +244,7 @@ class TestActionsEventsContainer:
|
|||
# convert2timestamp=True)
|
||||
# assert is_descending_order, "Column data should be in descending order"
|
||||
|
||||
@pytest.mark.develop
|
||||
# @pytest.mark.develop
|
||||
def test_real_time_events_table_pagination(self, browser: Page):
|
||||
"""Проверяет возможность пагинации таблицы событий.
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from pages.users_tab import UsersTab
|
|||
from pages.main_page import MainPage
|
||||
from pages.login_page import LoginPage
|
||||
|
||||
user_data = {"name": "TestUserForChangePwd", "role": "Администратор", "password": "qwerty1234567", "new_password": "ytrewq7654321"}
|
||||
user_data = {"name": "TestUserForChangePwd", "role": "Оператор", "password": "qwerty1234567", "new_password": "ytrewq7654321"}
|
||||
|
||||
# @pytest.mark.smoke
|
||||
class TestUserCard:
|
||||
|
|
@ -81,6 +81,7 @@ class TestUserCard:
|
|||
mp_admin = MainPage(browser)
|
||||
mp_admin.click_main_navigation_panel_item("Настройки")
|
||||
mp_admin.click_subpanel_item("Пользователи")
|
||||
mp.wait_for_timeout(1000)
|
||||
|
||||
ut = UsersTab(browser)
|
||||
ut.open_edit_user_page_by_user(user_data["name"], user_data["role"])
|
||||
|
|
@ -180,7 +181,7 @@ class TestUserCard:
|
|||
is_changed, error = change_password_window.change_password(user_data["password"], user_data["new_password"])
|
||||
assert is_changed, f"Unsucessful attempt to change password: {error}"
|
||||
|
||||
@pytest.mark.develop
|
||||
# @pytest.mark.develop
|
||||
def test_change_password_unsuccessful(self, browser: Page,
|
||||
create_user: None,
|
||||
cleanup_user: None) -> None:
|
||||
|
|
@ -209,6 +210,7 @@ class TestUserCard:
|
|||
|
||||
change_password_window.check_error_message("Пароли не совпадают")
|
||||
change_password_window.click_cancel_button()
|
||||
mp.wait_for_timeout(1000)
|
||||
|
||||
# Используется неправильный старый пароль
|
||||
user_card = mp.click_user_button()
|
||||
|
|
@ -217,6 +219,7 @@ class TestUserCard:
|
|||
is_changed, _ = change_password_window.change_password("123456789123", user_data["new_password"])
|
||||
assert not is_changed, "Sucessful attempt to change password for incorrect old password"
|
||||
change_password_window.click_cancel_button()
|
||||
mp.wait_for_timeout(1000)
|
||||
|
||||
|
||||
# Пустое поле ввода пароля на примере поля ввода старого пароля
|
||||
|
|
|
|||
Loading…
Reference in New Issue