aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/test_mainwindow.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2b4b42d..0b32553 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -29,7 +29,9 @@ function(add_qtmaildir_test name)
target_link_libraries(test_${name} PRIVATE qtmaildir_lib Qt6::Test)
add_test(NAME ${name} COMMAND test_${name})
set_tests_properties(${name} PROPERTIES
- ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
+ # --disable-gpu: QtWebEngine 6.140's in-process GPU thread hits a
+ # SIGTRAP under offscreen, which has no GPU to offer anyway.
+ ENVIRONMENT "QT_QPA_PLATFORM=offscreen;QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu")
endfunction()
add_qtmaildir_test(keymap)
diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp
index 5eed336..9fc8439 100644
--- a/tests/test_mainwindow.cpp
+++ b/tests/test_mainwindow.cpp
@@ -13736,6 +13736,11 @@ void TestMainWindow::undoMovesTheMessageBack()
view->setCurrentIndex(model->index(0, 0, QModelIndex()));
window.findChild<QAction *>(QStringLiteral("delete"))->trigger();
QTRY_VERIFY_WITH_TIMEOUT(folderHasMessageFile(trash, stem), 15000);
+ // The file reaches the trash inside the worker BEFORE its confirmation
+ // crosses back and pushes the MoveCommand, so the undo has to wait for
+ // the stack too. Triggering on the file alone undid an empty stack, which
+ // Qt 6.12's quicker QTRY made deterministic.
+ QTRY_VERIFY_WITH_TIMEOUT(window.canUndo(), 15000);
window.findChild<QAction *>(QStringLiteral("undo"))->trigger();