Skip to content

Commit

Permalink
Fix TestGui::testDatabaseSettings open tab missing (#9162)
Browse files Browse the repository at this point in the history
Co-authored-by: jNullj <jNullj@users.noreply.github.com>
  • Loading branch information
jNullj and jNullj committed Feb 25, 2023
1 parent 1129986 commit 7a65056
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/gui/TestGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,12 +1462,16 @@ void TestGui::testDatabaseSettings()
m_db->metadata()->setName("testDatabaseSettings");
triggerAction("actionDatabaseSettings");
auto* dbSettingsDialog = m_dbWidget->findChild<QWidget*>("databaseSettingsDialog");
auto* dbSettingsCategoryList = dbSettingsDialog->findChild<CategoryListWidget*>("categoryList");
auto* dbSettingsStackedWidget = dbSettingsDialog->findChild<QStackedWidget*>("stackedWidget");
auto* transformRoundsSpinBox = dbSettingsDialog->findChild<QSpinBox*>("transformRoundsSpinBox");
auto advancedToggle = dbSettingsDialog->findChild<QCheckBox*>("advancedSettingsToggle");

advancedToggle->setChecked(true);
QApplication::processEvents();

dbSettingsCategoryList->setCurrentCategory(1); // go into security category
dbSettingsStackedWidget->findChild<QTabWidget*>()->setCurrentIndex(1); // go into encryption tab
QVERIFY(transformRoundsSpinBox != nullptr);
transformRoundsSpinBox->setValue(123456);
QTest::keyClick(transformRoundsSpinBox, Qt::Key_Enter);
Expand Down

0 comments on commit 7a65056

Please sign in to comment.