mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-12-27 17:41:17 +01:00
23 lines
597 B
Python
23 lines
597 B
Python
# pylint: disable=missing-function-docstring, missing-module-docstring, unused-import
|
|
|
|
import pytest
|
|
|
|
from bec_widgets.widgets.control.buttons.stop_button.stop_button import StopButton
|
|
|
|
from .client_mocks import mocked_client
|
|
|
|
|
|
@pytest.fixture
|
|
def stop_button(qtbot, mocked_client):
|
|
widget = StopButton(client=mocked_client)
|
|
qtbot.addWidget(widget)
|
|
qtbot.waitExposed(widget)
|
|
yield widget
|
|
|
|
|
|
def test_stop_button(stop_button):
|
|
assert stop_button.button.text() == "Stop"
|
|
stop_button.button.click()
|
|
assert stop_button.queue.request_scan_halt.called
|
|
stop_button.close()
|