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:
parent
736b80b8f1
commit
dbf8f2b92f
10 changed files with 793 additions and 18 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue