From 3c913f196f40034d6543a25a1d26921842a8c4f4 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 16 Jul 2012 17:37:59 +0200 Subject: [PATCH] In TestGui::testEditEntry() wait for the delayed Database::modified() signal. --- tests/gui/TestGui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 431ea1048..4da81777e 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -98,7 +98,7 @@ void TestGui::testEditEntry() QDialogButtonBox* editEntryWidgetButtonBox = editEntryWidget->findChild("buttonBox"); QVERIFY(editEntryWidgetButtonBox); QTest::mouseClick(editEntryWidgetButtonBox->button(QDialogButtonBox::Ok), Qt::LeftButton); - QTest::qWait(20); + QTest::qWait(200); // wait for modified timer // make sure the database isn't marked as modified QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()), QString("NewDatabase.kdbx")); } @@ -135,7 +135,7 @@ void TestGui::testAddEntry() QCOMPARE(entry->title(), QString("test")); QCOMPARE(entry->historyItems().size(), 0); - QTest::qWait(200); + QTest::qWait(200); // wait for modified timer QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()), QString("NewDatabase.kdbx*")); QAction* entryEditAction = m_mainWindow->findChild("actionEntryEdit"); @@ -252,7 +252,7 @@ void TestGui::testSave() { Database* db = m_tabWidget->currentDatabaseWidget()->database(); db->metadata()->setName("Save"); - QTest::qWait(200); + QTest::qWait(200); // wait for modified timer QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()), QString("Save*")); QAction* actionDatabaseSave = m_mainWindow->findChild("actionDatabaseSave");