Switch test code to PyQt6

This commit is contained in:
Veronica Berglyd Olsen
2025-01-11 20:36:42 +01:00
parent 40c4e74d48
commit da036efdcf
47 changed files with 169 additions and 160 deletions
+7 -6
View File
@@ -28,9 +28,9 @@ from shutil import copyfile
import pytest
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import QInputDialog, QMenu, QMessageBox
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QPalette
from PyQt6.QtWidgets import QInputDialog, QMenu, QMessageBox
from novelwriter import CONFIG, SHARED
from novelwriter.constants import nwFiles
@@ -782,11 +782,12 @@ def testGuiMain_Features(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
# Full Screen Mode
# ================
assert nwGUI.windowState() & Qt.WindowFullScreen != Qt.WindowFullScreen
fullScreen = Qt.WindowState.WindowFullScreen
assert nwGUI.windowState() & fullScreen != fullScreen
nwGUI.toggleFullScreenMode()
assert nwGUI.windowState() & Qt.WindowFullScreen == Qt.WindowFullScreen
assert nwGUI.windowState() & fullScreen == fullScreen
nwGUI.toggleFullScreenMode()
assert nwGUI.windowState() & Qt.WindowFullScreen != Qt.WindowFullScreen
assert nwGUI.windowState() & fullScreen != fullScreen
# SideBar Menu
# ============