mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-06-06 13:28:41 +02:00
fix(scatter_waveform): remove curve_json from the properties
This commit is contained in:
@@ -44,11 +44,7 @@ def test_rpc_plotting_shortcuts_init_configs(qtbot, connected_client_gui_obj):
|
||||
|
||||
im.image(monitor="eiger")
|
||||
mm.map(x_name="samx", y_name="samy")
|
||||
sw.plot(x_name="samx", y_name="samy", z_name="bpm4i")
|
||||
assert sw.main_curve.object_name == "bpm4i_bpm4i"
|
||||
# Create a new curve on the scatter waveform should replace the old one
|
||||
sw.plot(x_name="samx", y_name="samy", z_name="bpm4a")
|
||||
assert sw.main_curve.object_name == "bpm4a_bpm4a"
|
||||
mw.plot(monitor="waveform")
|
||||
# Adding multiple custom curves sho
|
||||
|
||||
|
||||
@@ -49,28 +49,6 @@ def test_scatter_waveform_color_map(qtbot, mocked_client):
|
||||
assert swf.color_map == "plasma"
|
||||
|
||||
|
||||
def test_scatter_waveform_curve_json(qtbot, mocked_client):
|
||||
swf = create_widget(qtbot, ScatterWaveform, client=mocked_client)
|
||||
|
||||
# Add a device-based scatter curve
|
||||
swf.plot(x_name="samx", y_name="samy", z_name="bpm4i", label="test_curve")
|
||||
|
||||
json_str = swf.curve_json
|
||||
data = json.loads(json_str)
|
||||
assert isinstance(data, dict)
|
||||
assert data["label"] == "test_curve"
|
||||
assert data["x_device"]["name"] == "samx"
|
||||
assert data["y_device"]["name"] == "samy"
|
||||
assert data["z_device"]["name"] == "bpm4i"
|
||||
|
||||
# Clear and reload from JSON
|
||||
swf.clear_all()
|
||||
assert swf.main_curve.getData() == (None, None)
|
||||
|
||||
swf.curve_json = json_str
|
||||
assert swf.main_curve.config.label == "test_curve"
|
||||
|
||||
|
||||
def test_scatter_waveform_update_with_scan_history(qtbot, mocked_client, monkeypatch):
|
||||
swf = create_widget(qtbot, ScatterWaveform, client=mocked_client)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user