mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-30 17:37:36 -04:00
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
This commit is contained in:
parent
65a1d1b0f7
commit
ba8f787d0d
1 changed files with 3 additions and 0 deletions
|
@ -109,6 +109,8 @@ void TestGui::init()
|
||||||
config()->set(Config::UpdateCheckMessageShown, true);
|
config()->set(Config::UpdateCheckMessageShown, true);
|
||||||
// Disable quick unlock
|
// Disable quick unlock
|
||||||
config()->set(Config::Security_QuickUnlock, false);
|
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
|
// Copy the test database file to the temporary file
|
||||||
auto origFilePath = QDir(KEEPASSX_TEST_DATA_DIR).absoluteFilePath("NewDatabase.kdbx");
|
auto origFilePath = QDir(KEEPASSX_TEST_DATA_DIR).absoluteFilePath("NewDatabase.kdbx");
|
||||||
|
@ -1889,5 +1891,6 @@ void TestGui::clickIndex(const QModelIndex& index,
|
||||||
Qt::MouseButton button,
|
Qt::MouseButton button,
|
||||||
Qt::KeyboardModifiers stateKey)
|
Qt::KeyboardModifiers stateKey)
|
||||||
{
|
{
|
||||||
|
view->scrollTo(index);
|
||||||
QTest::mouseClick(view->viewport(), button, stateKey, view->visualRect(index).center());
|
QTest::mouseClick(view->viewport(), button, stateKey, view->visualRect(index).center());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue