0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

fix(abort_button): abort button added; some minor fixes

This commit is contained in:
2024-08-29 14:07:52 +02:00
parent 6a919be88f
commit a568633c32
11 changed files with 179 additions and 6 deletions

View File

@ -0,0 +1,26 @@
# pylint: disable=missing-function-docstring, missing-module-docstring, unused-import
import pytest
from bec_widgets.widgets.button_abort.button_abort import AbortButton
from .client_mocks import mocked_client
@pytest.fixture
def abort_button(qtbot, mocked_client):
widget = AbortButton(client=mocked_client)
qtbot.addWidget(widget)
qtbot.waitExposed(widget)
yield widget
def test_abort_button(abort_button):
assert abort_button.button.text() == "Abort"
assert (
abort_button.button.styleSheet()
== "background-color: #666666; color: white; font-weight: bold; font-size: 12px;"
)
abort_button.button.click()
assert abort_button.queue.request_scan_abortion.called
abort_button.close()