Test if hitting the Down key moves the focus to the entry view.

This commit is contained in:
Akinori MUSHA 2015-01-05 22:37:37 +09:00
parent 5c7c7f54fa
commit b773dbe645

View File

@ -210,6 +210,10 @@ void TestGui::testSearch()
// Search for "some"
QTest::keyClicks(searchEdit, "some");
QTRY_COMPARE(entryView->model()->rowCount(), 4);
// Press Down to focus on the entry view
QVERIFY(!entryView->hasFocus());
QTest::keyClick(searchEdit, Qt::Key_Down);
QVERIFY(entryView->hasFocus());
clickIndex(entryView->model()->index(0, 1), entryView, Qt::LeftButton);
QAction* entryEditAction = m_mainWindow->findChild<QAction*>("actionEntryEdit");