diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-11-21 15:48:46 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-21 07:41:07 +0100 |
commit | b3e5750027c854dbe5a671c56c0c3d0b48026312 (patch) | |
tree | 8409389a2b230c54f654153e731e0c9189f97e99 /tests/auto/declarative | |
parent | 3ca7d45480483e898784a2c8d836a5e03983d85c (diff) |
Fix GridView currentIndex test stability
Change-Id: Ib3a8efdc4447712f9877b70338027efcceff558f
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml b/tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml index e3ec8f2d4a..624f639962 100644 --- a/tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml @@ -58,6 +58,7 @@ Rectangle { cellWidth: 80 cellHeight: 60 delegate: myDelegate + highlightMoveDuration: 400 model: testModel header: root.showHeader ? headerFooter : null footer: root.showFooter ? headerFooter : null diff --git a/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp b/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp index 717423244e..322587876b 100644 --- a/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp @@ -1365,6 +1365,9 @@ void tst_QQuickGridView::currentIndex() gridview->moveCurrentIndexLeft(); QCOMPARE(gridview->currentIndex(), 35); + // wait until motion stops + QTRY_VERIFY(gridview->verticalVelocity() == 0.0); + // no wrap gridview->setCurrentIndex(0); QCOMPARE(gridview->currentIndex(), 0); |