feat: Add delete and preview functionality for branding in settings dialog and update translations
This commit is contained in:
parent
e1dbc2ee84
commit
b826bd9b20
10 changed files with 143 additions and 17 deletions
|
|
@ -122,6 +122,8 @@ class TestSettingsDialogInitialization:
|
|||
assert dialog.branding_display_name_input.text() == "Default"
|
||||
assert dialog.branding_logo_path_input is not None
|
||||
assert dialog.browse_branding_logo_btn is not None
|
||||
assert dialog.branding_preview_name_label.text() == "Default"
|
||||
assert dialog.delete_branding_btn is not None
|
||||
|
||||
def test_save_branding_as_creates_custom_template(
|
||||
self, qtbot, sample_config, monkeypatch, tmp_path
|
||||
|
|
@ -131,8 +133,11 @@ class TestSettingsDialogInitialization:
|
|||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
logo_path = tmp_path / "customer-logo.png"
|
||||
logo_path.write_bytes(b"fake-png-data")
|
||||
|
||||
dialog.branding_display_name_input.setText("Customer A")
|
||||
dialog.branding_logo_path_input.setText("/tmp/customer-logo.png")
|
||||
dialog.branding_logo_path_input.setText(str(logo_path))
|
||||
|
||||
with patch("PySide6.QtWidgets.QInputDialog.getText", return_value=("Customer A", True)):
|
||||
dialog._save_branding_as()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue