Enhance test coverage and refactor code in various modules

- Achieved 85% overall test coverage with detailed results for individual components.
- Added unit tests for DragInterceptor and MainWindow components.
- Refactored imports and removed unused code in multiple files.
- Updated test configurations and ensured compliance with coverage standards.
This commit is contained in:
claudi 2026-01-28 11:51:59 +01:00
parent 736b80b8f1
commit dbf8f2b92f
10 changed files with 793 additions and 18 deletions

View file

@ -1,7 +1,6 @@
"""WebDrop Bridge - Application entry point."""
import sys
from pathlib import Path
from PySide6.QtWidgets import QApplication

View file

@ -4,7 +4,6 @@ from pathlib import Path
from typing import Optional
from PySide6.QtCore import QSize, Qt, QUrl
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import QMainWindow, QToolBar, QVBoxLayout, QWidget
from webdrop_bridge.config import Config
@ -151,13 +150,13 @@ class MainWindow(QMainWindow):
# Back button
back_action = self.web_view.pageAction(
self.web_view.WebAction.Back # type: ignore
self.web_view.page().WebAction.Back # type: ignore
)
toolbar.addAction(back_action)
# Forward button
forward_action = self.web_view.pageAction(
self.web_view.WebAction.Forward # type: ignore
self.web_view.page().WebAction.Forward # type: ignore
)
toolbar.addAction(forward_action)
@ -170,7 +169,7 @@ class MainWindow(QMainWindow):
# Refresh button
refresh_action = self.web_view.pageAction(
self.web_view.WebAction.Reload # type: ignore
self.web_view.page().WebAction.Reload # type: ignore
)
toolbar.addAction(refresh_action)

View file

@ -2,7 +2,6 @@
import fnmatch
from typing import List, Optional
from urllib.parse import urlparse
from PySide6.QtCore import QUrl
from PySide6.QtGui import QDesktopServices