fix(main_app): temporarily disable IDE view

Will remain disabled until we have migrated the IDE view to use the procedures
This commit is contained in:
2026-03-05 14:06:32 +01:00
committed by wakonig_k
parent 5bcf440be7
commit bfc9f19472
2 changed files with 35 additions and 35 deletions
+9 -9
View File
@@ -62,8 +62,7 @@ class BECMainApp(BECMainWindow):
self.add_section("BEC Applications", "bec_apps")
self.dock_area = DockAreaView(self)
self.device_manager = DeviceManagerView(self)
self.developer_view = DeveloperView(self)
# self.developer_view = DeveloperView(self) #TODO temporary disable until the bugs with BECShell are resolved
self.add_view(icon="widgets", title="Dock Area", widget=self.dock_area, mini_text="Docks")
self.add_view(
icon="display_settings",
@@ -71,13 +70,14 @@ class BECMainApp(BECMainWindow):
widget=self.device_manager,
mini_text="DM",
)
self.add_view(
icon="code_blocks",
title="IDE",
widget=self.developer_view,
mini_text="IDE",
exclusive=True,
)
# TODO temporary disable until the bugs with BECShell are resolved
# self.add_view(
# icon="code_blocks",
# title="IDE",
# widget=self.developer_view,
# mini_text="IDE",
# exclusive=True,
# )
if self._show_examples:
self.add_section("Examples", "examples")
+26 -26
View File
@@ -136,11 +136,11 @@ def test_view_content_widget_is_hidden_from_namespace(app_with_spies):
assert app.dock_area.content is app.dock_area.dock_area
def test_developer_plotting_area_parent_id_uses_view_namespace(app_with_spies):
app, _, _, _ = app_with_spies
plotting_area = app.developer_view.developer_widget.plotting_ads
assert plotting_area.parent_id == app.developer_view.gui_id
# def test_developer_plotting_area_parent_id_uses_view_namespace(app_with_spies): #TODO temp disabled due to disabled IDE view
# app, _, _, _ = app_with_spies
# plotting_area = app.developer_view.developer_widget.plotting_ads
#
# assert plotting_area.parent_id == app.developer_view.gui_id
def test_parent_id_ignores_plain_qwidget_between_connectors(qtbot, mocked_client):
@@ -193,9 +193,9 @@ def test_views_can_extend_guided_tour(app_with_spies):
assert hasattr(app.device_manager, "register_tour_steps")
assert callable(app.device_manager.register_tour_steps)
# Check that developer view has register_tour_steps method
assert hasattr(app.developer_view, "register_tour_steps")
assert callable(app.developer_view.register_tour_steps)
# Check that developer view has register_tour_steps method #TODO temp disabled due to disabled IDE view
# assert hasattr(app.developer_view, "register_tour_steps")
# assert callable(app.developer_view.register_tour_steps)
# Verify that calling register_tour_steps returns ViewTourSteps or None
dm_tour = app.device_manager.register_tour_steps(app.guided_tour, app)
@@ -204,29 +204,29 @@ def test_views_can_extend_guided_tour(app_with_spies):
assert hasattr(dm_tour, "step_ids")
assert isinstance(dm_tour.step_ids, list)
ide_tour = app.developer_view.register_tour_steps(app.guided_tour, app)
if ide_tour is not None:
assert hasattr(ide_tour, "view_title")
assert hasattr(ide_tour, "step_ids")
assert isinstance(ide_tour.step_ids, list)
# ide_tour = app.developer_view.register_tour_steps(app.guided_tour, app) #TODO temp disabled due to disabled IDE view
# if ide_tour is not None:
# assert hasattr(ide_tour, "view_title")
# assert hasattr(ide_tour, "step_ids")
# assert isinstance(ide_tour.step_ids, list)
# Get all registered widgets
widgets = app.guided_tour.get_registered_widgets()
# pylint: disable=protected-access
# Test that ide_tour has valid steps and targets
for step_id in ide_tour.step_ids:
assert step_id in widgets
tour_step = widgets.get(step_id)
target, text = app.guided_tour._resolve_step_target(tour_step)
assert isinstance(text, str)
assert text != ""
if target is not None: # If step should be skipped
highlighted_rect = app.guided_tour._get_highlight_rect(app, target, tour_step["title"])
if (
highlighted_rect is not None
): # If widget is not visible, it will be skipped and return None
assert isinstance(highlighted_rect, QRect)
# Test that ide_tour has valid steps and targets #TODO temp disabled due to disabled IDE view
# for step_id in ide_tour.step_ids:
# assert step_id in widgets
# tour_step = widgets.get(step_id)
# target, text = app.guided_tour._resolve_step_target(tour_step)
# assert isinstance(text, str)
# assert text != ""
# if target is not None: # If step should be skipped
# highlighted_rect = app.guided_tour._get_highlight_rect(app, target, tour_step["title"])
# if (
# highlighted_rect is not None
# ): # If widget is not visible, it will be skipped and return None
# assert isinstance(highlighted_rect, QRect)
# Test that dm_tour has valid steps and targets, test it once
# with _initialized = True and False. This leads to different tour paths.