Fix some minor GUI issues
This commit is contained in:
@@ -28,7 +28,6 @@ import pytest
|
||||
from PyQt6.QtCore import QPoint
|
||||
from PyQt6.QtGui import QAction
|
||||
from PyQt6.QtWidgets import QFileDialog, QMenu
|
||||
from pytestqt.qtbot import QtBot
|
||||
|
||||
from novelwriter import CONFIG, SHARED
|
||||
from novelwriter.constants import nwFiles
|
||||
@@ -38,7 +37,7 @@ from novelwriter.types import QtMouseLeft
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
def testToolWelcome_Main(qtbot: QtBot, monkeypatch, nwGUI, fncPath):
|
||||
def testToolWelcome_Main(qtbot, monkeypatch, nwGUI, fncPath):
|
||||
"""Test the main Welcome window."""
|
||||
welcome = GuiWelcome(nwGUI)
|
||||
with qtbot.waitExposed(welcome):
|
||||
@@ -68,7 +67,7 @@ def testToolWelcome_Main(qtbot: QtBot, monkeypatch, nwGUI, fncPath):
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
def testToolWelcome_Open(qtbot: QtBot, monkeypatch, nwGUI, fncPath):
|
||||
def testToolWelcome_Open(qtbot, monkeypatch, nwGUI, fncPath):
|
||||
"""Test the open tab in the Welcome window."""
|
||||
monkeypatch.setattr(QMenu, "exec", lambda *a: None)
|
||||
|
||||
@@ -163,9 +162,9 @@ def testToolWelcome_Open(qtbot: QtBot, monkeypatch, nwGUI, fncPath):
|
||||
welcome.close()
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
# @pytest.mark.skip
|
||||
@pytest.mark.gui
|
||||
def testToolWelcome_New(qtbot: QtBot, caplog, monkeypatch, nwGUI, fncPath):
|
||||
def testToolWelcome_New(qtbot, caplog, monkeypatch, nwGUI, fncPath):
|
||||
"""Test the new project tab in the Welcome window."""
|
||||
welcome = GuiWelcome(nwGUI)
|
||||
with qtbot.waitExposed(welcome):
|
||||
@@ -205,10 +204,7 @@ def testToolWelcome_New(qtbot: QtBot, caplog, monkeypatch, nwGUI, fncPath):
|
||||
assert newForm.extraWidget.isVisible() is False
|
||||
|
||||
# Change back to fill blank using the menu
|
||||
newForm.browseFill.click()
|
||||
assert newForm.fillMenu.isVisible() is True
|
||||
newForm.fillMenu.actions()[0].activate(QAction.ActionEvent.Trigger)
|
||||
newForm.fillMenu.close()
|
||||
assert newForm._fillMode == newForm.FILL_BLANK
|
||||
assert newForm.projFill.text() == "Fresh Project"
|
||||
assert newForm.extraWidget.isVisible() is True
|
||||
|
||||
Reference in New Issue
Block a user