Проверка кнопки открытия окна анализатора удалена из теста и компонента страницы состояния сервисов
parent
be4e01a090
commit
e81a039ff0
|
|
@ -33,7 +33,6 @@ class ServiceStatusTab(BasePage):
|
||||||
self.table_locator = self.iframe_locator.locator("div.MuiBox-root > div > table")
|
self.table_locator = self.iframe_locator.locator("div.MuiBox-root > div > table")
|
||||||
self.tab_title_locator = self.iframe_locator.locator("//h5[text()='Состояние контейнеров']")
|
self.tab_title_locator = self.iframe_locator.locator("//h5[text()='Состояние контейнеров']")
|
||||||
self.update_button_locator = self.iframe_locator.get_by_role("button", name='Обновить')
|
self.update_button_locator = self.iframe_locator.get_by_role("button", name='Обновить')
|
||||||
self.analyzer_open_button_locator = self.iframe_locator.get_by_role("button", name='открыть анализатор')
|
|
||||||
|
|
||||||
self.tab_title = Text(page,
|
self.tab_title = Text(page,
|
||||||
self.tab_title_locator,
|
self.tab_title_locator,
|
||||||
|
|
@ -41,9 +40,7 @@ class ServiceStatusTab(BasePage):
|
||||||
self.update_button = Button(page,
|
self.update_button = Button(page,
|
||||||
self.update_button_locator,
|
self.update_button_locator,
|
||||||
"update_button")
|
"update_button")
|
||||||
self.analyzer_open_button = Button(page,
|
|
||||||
self.analyzer_open_button_locator,
|
|
||||||
"analyzer_open_button")
|
|
||||||
self.expand_work_area_button = ExpandButton(page)
|
self.expand_work_area_button = ExpandButton(page)
|
||||||
self.services_table = TableComponent(page)
|
self.services_table = TableComponent(page)
|
||||||
|
|
||||||
|
|
@ -199,6 +196,7 @@ class ServiceStatusTab(BasePage):
|
||||||
rows_count = self.services_table.get_rows_count(self.table_locator)
|
rows_count = self.services_table.get_rows_count(self.table_locator)
|
||||||
for i in range(rows_count):
|
for i in range(rows_count):
|
||||||
row_locator = self.services_table.get_row_locator(self.table_locator, i)
|
row_locator = self.services_table.get_row_locator(self.table_locator, i)
|
||||||
|
row_locator.scroll_into_view_if_needed()
|
||||||
|
|
||||||
layers_button = row_locator.get_by_role("button", name="Слои")
|
layers_button = row_locator.get_by_role("button", name="Слои")
|
||||||
expect(layers_button).to_be_visible(), f"Layers button is missing in {i} row"
|
expect(layers_button).to_be_visible(), f"Layers button is missing in {i} row"
|
||||||
|
|
@ -314,17 +312,6 @@ class ServiceStatusTab(BasePage):
|
||||||
"Service statuses table is missing"
|
"Service statuses table is missing"
|
||||||
)
|
)
|
||||||
|
|
||||||
def should_be_analyzer_open_button(self) -> None:
|
|
||||||
"""Проверяет наличие кнопки 'navigate_before/navigate_next'.
|
|
||||||
|
|
||||||
Raises:
|
|
||||||
AssertionError: Если кнопка отсутствует.
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.analyzer_open_button.check_visibility(
|
|
||||||
"Analyzer open button on bottom of service statuses tab is missing"
|
|
||||||
)
|
|
||||||
|
|
||||||
def should_be_expand_work_area_button(self) -> None:
|
def should_be_expand_work_area_button(self) -> None:
|
||||||
"""Проверяет наличие кнопки расширения/сжатия рабочей области вкладки.
|
"""Проверяет наличие кнопки расширения/сжатия рабочей области вкладки.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class TestServiceStatusTab:
|
||||||
# Клик по пункту 'Статус обслуживания' в панели навигации обслуживания
|
# Клик по пункту 'Статус обслуживания' в панели навигации обслуживания
|
||||||
mp.click_subpanel_item("Статус обслуживания")
|
mp.click_subpanel_item("Статус обслуживания")
|
||||||
|
|
||||||
# @pytest.mark.develop
|
@pytest.mark.develop
|
||||||
def test_service_status_tab_content(self, browser: Page):
|
def test_service_status_tab_content(self, browser: Page):
|
||||||
"""Проверяет содержимое вкладки 'Статус обслуживания'.
|
"""Проверяет содержимое вкладки 'Статус обслуживания'.
|
||||||
|
|
||||||
|
|
@ -66,9 +66,6 @@ class TestServiceStatusTab:
|
||||||
# Проверка наличия кнопки 'Обновить'
|
# Проверка наличия кнопки 'Обновить'
|
||||||
sst.should_be_update_button()
|
sst.should_be_update_button()
|
||||||
|
|
||||||
# Проверка наличия кнопки 'Открыть анализатор'
|
|
||||||
sst.should_be_analyzer_open_button()
|
|
||||||
|
|
||||||
# Проверка наличия кнопки расширения/сжатия рабочей области вкладки
|
# Проверка наличия кнопки расширения/сжатия рабочей области вкладки
|
||||||
sst.should_be_expand_work_area_button()
|
sst.should_be_expand_work_area_button()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue