Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2022-05-31 06:13:24 +0300
committerJonathan White <support@dmapps.us>2022-05-31 06:31:34 +0300
commitba8f787d0d5234a0f4d2b7811c81d0f677627dfc (patch)
treedc5fa31cbe9f8669224777eb4e23928481f7f91c /tests
parent65a1d1b0f7da71755e0f41103b5e88aea8635cd9 (diff)
Fix transient errors in GUI tests
* Fix saving file errors due to atomic saves on Windows * Fix tests that rely on clicking a list index that is out of view
Diffstat (limited to 'tests')
-rw-r--r--tests/gui/TestGui.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp
index f91d45655..fc3da4ea9 100644
--- a/tests/gui/TestGui.cpp
+++ b/tests/gui/TestGui.cpp
@@ -109,6 +109,8 @@ void TestGui::init()
config()->set(Config::UpdateCheckMessageShown, true);
// Disable quick unlock
config()->set(Config::Security_QuickUnlock, false);
+ // Disable atomic saves to prevent transient errors on some platforms
+ config()->set(Config::UseAtomicSaves, false);
// Copy the test database file to the temporary file
auto origFilePath = QDir(KEEPASSX_TEST_DATA_DIR).absoluteFilePath("NewDatabase.kdbx");
@@ -1889,5 +1891,6 @@ void TestGui::clickIndex(const QModelIndex& index,
Qt::MouseButton button,
Qt::KeyboardModifiers stateKey)
{
+ view->scrollTo(index);
QTest::mouseClick(view->viewport(), button, stateKey, view->visualRect(index).center());
}