From b773dbe6458cfca9b43365964caf3e248cf616b1 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Mon, 5 Jan 2015 22:37:37 +0900 Subject: [PATCH] Test if hitting the Down key moves the focus to the entry view. --- tests/gui/TestGui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 6443ea5d2..6aa49b836 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -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("actionEntryEdit");