mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
fix(reset_button): reset button added
This commit is contained in:
26
tests/unit_tests/test_reset_button.py
Normal file
26
tests/unit_tests/test_reset_button.py
Normal file
@ -0,0 +1,26 @@
|
||||
# pylint: disable=missing-function-docstring, missing-module-docstring, unused-import
|
||||
|
||||
import pytest
|
||||
|
||||
from bec_widgets.widgets.button_reset.button_reset import ResetButton
|
||||
|
||||
from .client_mocks import mocked_client
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def reset_button(qtbot, mocked_client):
|
||||
widget = ResetButton(client=mocked_client)
|
||||
qtbot.addWidget(widget)
|
||||
qtbot.waitExposed(widget)
|
||||
yield widget
|
||||
|
||||
|
||||
def test_stop_button(reset_button):
|
||||
assert reset_button.button.text() == "Reset Queue"
|
||||
assert (
|
||||
reset_button.button.styleSheet()
|
||||
== "background-color: #F19E39; color: white; font-weight: bold; font-size: 12px;"
|
||||
)
|
||||
reset_button.button.click()
|
||||
assert reset_button.queue.request_queue_reset.called
|
||||
reset_button.close()
|
Reference in New Issue
Block a user