mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Improve overall database settings behavior
* Fixes #10723 - only display password strength warning when actively editing the password * Also improve behavior of minimum quality warning * Improve behavior and handling of password changes with the database settings dialog * Prevents loss of newly entered password when toggling between elements in the settings page * On error, switch to tab that prevents saving database settings for easier correction
This commit is contained in:
@@ -1607,12 +1607,20 @@ void TestGui::testDatabaseSettings()
|
||||
passwordWidgets[0]->setText("b");
|
||||
passwordWidgets[1]->setText("b");
|
||||
|
||||
// Cancel password change
|
||||
// Toggle between tabs to ensure the password remains
|
||||
securityTabWidget->setCurrentIndex(1);
|
||||
QApplication::processEvents();
|
||||
securityTabWidget->setCurrentIndex(0);
|
||||
QApplication::processEvents();
|
||||
QCOMPARE(passwordWidgets[0]->text(), QString("b"));
|
||||
|
||||
// Cancel password change and confirm password is cleared
|
||||
auto cancelPasswordButton = passwordEditWidget->findChild<QPushButton*>("cancelButton");
|
||||
QVERIFY(cancelPasswordButton);
|
||||
QTest::mouseClick(cancelPasswordButton, Qt::LeftButton);
|
||||
QApplication::processEvents();
|
||||
QVERIFY(!passwordWidgets[0]->isVisible());
|
||||
QCOMPARE(passwordWidgets[0]->text(), QString(""));
|
||||
QVERIFY(editPasswordButton->isVisible());
|
||||
|
||||
// Switch to encryption tab and interact with various settings
|
||||
|
||||
Reference in New Issue
Block a user