Reviewed-on: #15 Co-authored-by: phg <mail@philip-henning.com> Co-committed-by: phg <mail@philip-henning.com>
This commit is contained in:
parent
9f8e9c3415
commit
0b7b52521f
19 changed files with 1507 additions and 723 deletions
|
|
@ -57,15 +57,15 @@ class TestSaveConfirmationModal:
|
|||
|
||||
@patch.object(SaveConfirmationModal, "query_one")
|
||||
def test_on_mount_sets_focus(self, mock_query_one):
|
||||
"""Test that on_mount sets focus to the save button."""
|
||||
"""Test that on_mount sets focus to the safe cancel button."""
|
||||
modal = SaveConfirmationModal()
|
||||
mock_save_button = Mock()
|
||||
mock_query_one.return_value = mock_save_button
|
||||
mock_cancel_button = Mock()
|
||||
mock_query_one.return_value = mock_cancel_button
|
||||
|
||||
modal.on_mount()
|
||||
|
||||
mock_query_one.assert_called_once_with("#save-button", Button)
|
||||
mock_save_button.focus.assert_called_once()
|
||||
mock_query_one.assert_called_once_with("#cancel-button", Button)
|
||||
mock_cancel_button.focus.assert_called_once()
|
||||
|
||||
|
||||
class TestSaveConfirmationIntegration:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue