mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-24 23:09:44 -05:00
Added tests to confirm mismatched passwords block saving
This commit is contained in:
parent
de5f8082de
commit
611a74d74d
@ -268,6 +268,17 @@ void TestGui::testEditEntry()
|
||||
QCOMPARE(attrTextEdit->toPlainText(), attrText);
|
||||
editEntryWidget->setCurrentPage(0);
|
||||
|
||||
// Test mismatch passwords
|
||||
QLineEdit* passwordEdit = editEntryWidget->findChild<QLineEdit*>("passwordEdit");
|
||||
QString originalPassword = passwordEdit->text();
|
||||
passwordEdit->setText("newpass");
|
||||
QTest::mouseClick(editEntryWidgetButtonBox->button(QDialogButtonBox::Ok), Qt::LeftButton);
|
||||
MessageWidget* messageWiget = editEntryWidget->findChild<MessageWidget*>("messageWidget");
|
||||
QTRY_VERIFY(messageWiget->isVisible());
|
||||
QCOMPARE(m_dbWidget->currentMode(), DatabaseWidget::EditMode);
|
||||
QCOMPARE(passwordEdit->text(), QString("newpass"));
|
||||
passwordEdit->setText(originalPassword);
|
||||
|
||||
// Save the edit (press OK)
|
||||
QTest::mouseClick(editEntryWidgetButtonBox->button(QDialogButtonBox::Ok), Qt::LeftButton);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user