feat: Implement runtime branding management and add branding settings to UI
This commit is contained in:
parent
f022d984b6
commit
ca7105a6bc
8 changed files with 493 additions and 64 deletions
|
|
@ -1,11 +1,10 @@
|
|||
"""Tests for settings dialog."""
|
||||
|
||||
from pathlib import Path
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from webdrop_bridge.config import Config, ConfigurationError
|
||||
from webdrop_bridge.config import Config
|
||||
from webdrop_bridge.ui.settings_dialog import SettingsDialog
|
||||
|
||||
|
||||
|
|
@ -44,7 +43,7 @@ class TestSettingsDialogInitialization:
|
|||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs is not None
|
||||
assert dialog.tabs.count() == 7 # General + previous 6 tabs
|
||||
assert dialog.tabs.count() == 8 # General + Branding + previous 6 tabs
|
||||
|
||||
def test_dialog_has_general_tab(self, qtbot, sample_config):
|
||||
"""Test General tab exists."""
|
||||
|
|
@ -53,47 +52,54 @@ class TestSettingsDialogInitialization:
|
|||
|
||||
assert dialog.tabs.tabText(0) == "General"
|
||||
|
||||
def test_dialog_has_branding_tab(self, qtbot, sample_config):
|
||||
"""Test Branding tab exists."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(1) == "Branding"
|
||||
|
||||
def test_dialog_has_web_source_tab(self, qtbot, sample_config):
|
||||
"""Test Web Source tab exists."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(1) == "Web Source"
|
||||
assert dialog.tabs.tabText(2) == "Web Source"
|
||||
|
||||
def test_dialog_has_paths_tab(self, qtbot, sample_config):
|
||||
"""Test Paths tab exists."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(2) == "Paths"
|
||||
assert dialog.tabs.tabText(3) == "Paths"
|
||||
|
||||
def test_dialog_has_urls_tab(self, qtbot, sample_config):
|
||||
"""Test URLs tab exists."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(3) == "URLs"
|
||||
assert dialog.tabs.tabText(4) == "URLs"
|
||||
|
||||
def test_dialog_has_logging_tab(self, qtbot, sample_config):
|
||||
"""Test Logging tab exists."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(4) == "Logging"
|
||||
assert dialog.tabs.tabText(5) == "Logging"
|
||||
|
||||
def test_dialog_has_window_tab(self, qtbot, sample_config):
|
||||
"""Test Window tab exists."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(5) == "Window"
|
||||
assert dialog.tabs.tabText(6) == "Window"
|
||||
|
||||
def test_dialog_has_profiles_tab(self, qtbot, sample_config):
|
||||
"""Test Setups tab exists with clearer wording."""
|
||||
dialog = SettingsDialog(sample_config)
|
||||
qtbot.addWidget(dialog)
|
||||
|
||||
assert dialog.tabs.tabText(6) == "Setups"
|
||||
assert dialog.tabs.tabText(7) == "Setups"
|
||||
|
||||
def test_profiles_actions_have_explanatory_tooltips(self, qtbot, sample_config):
|
||||
"""Test profile/config actions expose helpful explanations."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue