1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-04-08 09:47:52 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
6848a9e20b test(e2e): avoid timing issues in rpc_gui_obj test 2026-03-15 12:30:40 +01:00
5 changed files with 10 additions and 29 deletions

View File

@@ -1,20 +1,6 @@
# CHANGELOG
## v3.2.1 (2026-03-16)
### Bug Fixes
- **e2e**: Bec dock rpc fixed synchronization
([`e061fa3`](https://github.com/bec-project/bec_widgets/commit/e061fa31a9a5e5c00e44337d7cc52c51d8e259b5))
- **e2e**: Bec shell excluded from e2e testing
([`974f259`](https://github.com/bec-project/bec_widgets/commit/974f25997d68d13ff1063026f9e5c4c8dd4d49f3))
- **e2e**: Timeout for maybe_remove_dock_area
([`718f995`](https://github.com/bec-project/bec_widgets/commit/718f99527c3bebb96845d3305aba69434eb83f77))
## v3.2.0 (2026-03-11)
### Features

View File

@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "bec_widgets"
version = "3.2.1"
version = "3.2.0"
description = "BEC Widgets"
requires-python = ">=3.11"
classifiers = [

View File

@@ -75,13 +75,6 @@ def test_dock_manipulations_e2e(qtbot, connected_client_gui_obj):
w1 = dock_area.new("Waveform")
w2 = dock_area.new("Waveform")
qtbot.waitUntil(
lambda: all(
gui_id in gui._server_registry for gui_id in [w0._gui_id, w1._gui_id, w2._gui_id]
),
timeout=5000,
)
assert hasattr(gui.bec, "Waveform")
assert hasattr(gui.bec, "Waveform_0")
assert hasattr(gui.bec, "Waveform_1")
@@ -133,7 +126,6 @@ def test_rpc_gui_obj(connected_client_gui_obj, qtbot):
xw = gui.new("X")
xw.delete_all()
qtbot.waitUntil(lambda: len(gui.windows) == 2, timeout=3000)
assert xw.__class__.__name__ == "RPCReference"
assert gui._ipython_registry[xw._gui_id].__class__.__name__ == "BECDockArea"
assert len(gui.windows) == 2
@@ -153,15 +145,14 @@ def test_rpc_gui_obj(connected_client_gui_obj, qtbot):
qtbot.waitUntil(wait_for_gui_started, timeout=3000)
# gui.windows should have bec with gui_id 'bec'
qtbot.waitUntil(lambda: len(gui.windows) == 1, timeout=3000)
assert len(gui.windows) == 1
# communication should work, main dock area should have same id and be visible
yw = gui.new("Y")
yw.delete_all()
qtbot.waitUntil(lambda: len(gui.windows) == 2, timeout=3000)
yw.delete_all()
assert len(gui.windows) == 2
yw.remove()
qtbot.waitUntil(lambda: len(gui.windows) == 1, timeout=3000)
assert len(gui.windows) == 1 # only bec is left
assert len(gui.windows) == 1

View File

@@ -89,8 +89,8 @@ def test_available_widgets(qtbot, connected_client_gui_obj):
# Skip private attributes
if object_name.startswith("_"):
continue
# Skip BECShell as ttyd is not installed
if object_name == "BECShell":
# Skip VSCode widget as Code server is not available in the Docker image
if object_name == "VSCodeEditor":
continue
# Skip WebConsole as ttyd is not installed

View File

@@ -128,9 +128,13 @@ def maybe_remove_dock_area(qtbot, gui: BECGuiClient, random_int_gen: random.Rand
random_int = random_int_gen.randint(0, 100)
if random_int >= 50:
# Needed, reference gets deleted in the gui
name = gui.dock_area.object_name
gui_id = gui.dock_area._gui_id
gui.dock_area.delete_all() # start fresh
gui.delete("dock_area")
qtbot.waitUntil(lambda: hasattr(gui, "dock_area") is False, timeout=5000)
wait_for_namespace_change(
qtbot, gui=gui, parent_widget=gui, object_name=name, widget_gui_id=gui_id, exists=False
)
@pytest.mark.timeout(PYTEST_TIMEOUT)