Skip to content

Commit cd29650

Browse files
committed
fix(main_app): temporarily disable IDE view
1 parent e68f0c7 commit cd29650

2 files changed

Lines changed: 35 additions & 35 deletions

File tree

bec_widgets/applications/main_app.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@ def _add_views(self):
6262
self.add_section("BEC Applications", "bec_apps")
6363
self.dock_area = DockAreaView(self)
6464
self.device_manager = DeviceManagerView(self)
65-
self.developer_view = DeveloperView(self)
66-
65+
# self.developer_view = DeveloperView(self) #TODO temporary disable until the bugs with BECShell are resolved
6766
self.add_view(icon="widgets", title="Dock Area", widget=self.dock_area, mini_text="Docks")
6867
self.add_view(
6968
icon="display_settings",
7069
title="Device Manager",
7170
widget=self.device_manager,
7271
mini_text="DM",
7372
)
74-
self.add_view(
75-
icon="code_blocks",
76-
title="IDE",
77-
widget=self.developer_view,
78-
mini_text="IDE",
79-
exclusive=True,
80-
)
73+
# TODO temporary disable until the bugs with BECShell are resolved
74+
# self.add_view(
75+
# icon="code_blocks",
76+
# title="IDE",
77+
# widget=self.developer_view,
78+
# mini_text="IDE",
79+
# exclusive=True,
80+
# )
8181

8282
if self._show_examples:
8383
self.add_section("Examples", "examples")

tests/unit_tests/test_main_app.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ def test_view_content_widget_is_hidden_from_namespace(app_with_spies):
136136
assert app.dock_area.content is app.dock_area.dock_area
137137

138138

139-
def test_developer_plotting_area_parent_id_uses_view_namespace(app_with_spies):
140-
app, _, _, _ = app_with_spies
141-
plotting_area = app.developer_view.developer_widget.plotting_ads
142-
143-
assert plotting_area.parent_id == app.developer_view.gui_id
139+
# def test_developer_plotting_area_parent_id_uses_view_namespace(app_with_spies): #TODO temp disabled due to disabled IDE view
140+
# app, _, _, _ = app_with_spies
141+
# plotting_area = app.developer_view.developer_widget.plotting_ads
142+
#
143+
# assert plotting_area.parent_id == app.developer_view.gui_id
144144

145145

146146
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):
193193
assert hasattr(app.device_manager, "register_tour_steps")
194194
assert callable(app.device_manager.register_tour_steps)
195195

196-
# Check that developer view has register_tour_steps method
197-
assert hasattr(app.developer_view, "register_tour_steps")
198-
assert callable(app.developer_view.register_tour_steps)
196+
# Check that developer view has register_tour_steps method #TODO temp disabled due to disabled IDE view
197+
# assert hasattr(app.developer_view, "register_tour_steps")
198+
# assert callable(app.developer_view.register_tour_steps)
199199

200200
# Verify that calling register_tour_steps returns ViewTourSteps or None
201201
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):
204204
assert hasattr(dm_tour, "step_ids")
205205
assert isinstance(dm_tour.step_ids, list)
206206

207-
ide_tour = app.developer_view.register_tour_steps(app.guided_tour, app)
208-
if ide_tour is not None:
209-
assert hasattr(ide_tour, "view_title")
210-
assert hasattr(ide_tour, "step_ids")
211-
assert isinstance(ide_tour.step_ids, list)
207+
# ide_tour = app.developer_view.register_tour_steps(app.guided_tour, app) #TODO temp disabled due to disabled IDE view
208+
# if ide_tour is not None:
209+
# assert hasattr(ide_tour, "view_title")
210+
# assert hasattr(ide_tour, "step_ids")
211+
# assert isinstance(ide_tour.step_ids, list)
212212

213213
# Get all registered widgets
214214
widgets = app.guided_tour.get_registered_widgets()
215215

216216
# pylint: disable=protected-access
217-
# Test that ide_tour has valid steps and targets
218-
for step_id in ide_tour.step_ids:
219-
assert step_id in widgets
220-
tour_step = widgets.get(step_id)
221-
target, text = app.guided_tour._resolve_step_target(tour_step)
222-
assert isinstance(text, str)
223-
assert text != ""
224-
if target is not None: # If step should be skipped
225-
highlighted_rect = app.guided_tour._get_highlight_rect(app, target, tour_step["title"])
226-
if (
227-
highlighted_rect is not None
228-
): # If widget is not visible, it will be skipped and return None
229-
assert isinstance(highlighted_rect, QRect)
217+
# Test that ide_tour has valid steps and targets #TODO temp disabled due to disabled IDE view
218+
# for step_id in ide_tour.step_ids:
219+
# assert step_id in widgets
220+
# tour_step = widgets.get(step_id)
221+
# target, text = app.guided_tour._resolve_step_target(tour_step)
222+
# assert isinstance(text, str)
223+
# assert text != ""
224+
# if target is not None: # If step should be skipped
225+
# highlighted_rect = app.guided_tour._get_highlight_rect(app, target, tour_step["title"])
226+
# if (
227+
# highlighted_rect is not None
228+
# ): # If widget is not visible, it will be skipped and return None
229+
# assert isinstance(highlighted_rect, QRect)
230230

231231
# Test that dm_tour has valid steps and targets, test it once
232232
# with _initialized = True and False. This leads to different tour paths.

0 commit comments

Comments
 (0)