mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-24 23:09:44 -05:00
parent
66422437d3
commit
f767a098d6
@ -115,6 +115,7 @@ DatabaseWidget::DatabaseWidget(Database* db, QWidget* parent)
|
||||
headlineLabelFont.setPointSize(headlineLabelFont.pointSize() + 2);
|
||||
m_changeMasterKeyWidget->headlineLabel()->setFont(headlineLabelFont);
|
||||
m_databaseSettingsWidget = new DatabaseSettingsWidget();
|
||||
m_databaseSettingsWidget->setObjectName("databaseSettingsWidget");
|
||||
m_databaseOpenWidget = new DatabaseOpenWidget();
|
||||
m_databaseOpenWidget->setObjectName("databaseOpenWidget");
|
||||
m_keepass1OpenWidget = new KeePass1OpenWidget();
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <QtGui/QDialogButtonBox>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QSpinBox>
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QToolButton>
|
||||
|
||||
@ -252,6 +253,25 @@ void TestGui::testSave()
|
||||
QVERIFY(checkDatabase());
|
||||
}
|
||||
|
||||
void TestGui::testDatabaseSettings()
|
||||
{
|
||||
QAction* actionChangeDatabaseSettings = m_mainWindow->findChild<QAction*>("actionChangeDatabaseSettings");
|
||||
actionChangeDatabaseSettings->trigger();
|
||||
QWidget* dbSettingsWidget = m_dbWidget->findChild<QWidget*>("databaseSettingsWidget");
|
||||
QSpinBox* transformRoundsSpinBox = dbSettingsWidget->findChild<QSpinBox*>("transformRoundsSpinBox");
|
||||
transformRoundsSpinBox->setValue(100);
|
||||
QTest::keyClick(transformRoundsSpinBox, Qt::Key_Enter);
|
||||
QTest::qWait(200); // wait for modified timer
|
||||
QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()), QString("Save*"));
|
||||
QCOMPARE(m_db->transformRounds(), Q_UINT64_C(100));
|
||||
|
||||
QAction* actionDatabaseSave = m_mainWindow->findChild<QAction*>("actionDatabaseSave");
|
||||
actionDatabaseSave->trigger();
|
||||
QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()), QString("Save"));
|
||||
|
||||
QVERIFY(checkDatabase());
|
||||
}
|
||||
|
||||
void TestGui::testKeePass1Import()
|
||||
{
|
||||
QAction* actionImportKeePass1 = m_mainWindow->findChild<QAction*>("actionImportKeePass1");
|
||||
|
@ -39,6 +39,7 @@ private Q_SLOTS:
|
||||
void testSearch();
|
||||
void testSaveAs();
|
||||
void testSave();
|
||||
void testDatabaseSettings();
|
||||
void testKeePass1Import();
|
||||
void cleanupTestCase();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user